Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

tribonacci sequence python

def tribonacci(signature, n):
  res = signature[:n]
  for i in range(n - 3): res.append(sum(res[-3:]))
  return res
Code language: Python (python)
Source by ao.ms #
 
PREVIOUS NEXT
Tagged: #tribonacci #sequence #python
ADD COMMENT
Topic
Name
1+4 =