OFFSET
1,1
COMMENTS
LINKS
T. D. Noe, Table of n, a(n) for n = 1..1000
Eric Weisstein's World of Mathematics, Fibonacci n-Step Number
FORMULA
a(n) = A046738(prime(n)).
MATHEMATICA
n=3; Table[p=Prime[i]; a=Join[{1}, Table[0, {n-1}]]; a=Mod[a, p]; a0=a; k=0; While[k++; s=Mod[Plus@@a, p]; a=RotateLeft[a]; a[[n]]=s; a!=a0]; k, {i, 60}]
PROG
(Python)
from itertools import count
from sympy import prime
def A106302(n):
a = b = (0, )*2+(1 % (p:= prime(n)), )
for m in count(1):
b = b[1:] + (sum(b) % p, )
if a == b:
return m # Chai Wah Wu, Feb 27 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, May 02 2005, Sep 18 2008
STATUS
approved