OFFSET
1,3
COMMENTS
This sequence differs from the corresponding Fibonacci sequence (A106303) at all n that are multiples of 2 or 599 because 9584 is the discriminant of the characteristic polynomial x^5-x^4-x^3-x^2-x-1 and the prime factors of 9584 are 2 and 599.
LINKS
Eric Weisstein's World of Mathematics, Fibonacci n-Step Number
FORMULA
Let the prime factorization of n be p1^e1...pk^ek. Then a(n) = lcm(a(p1^e1), ..., a(pk^ek)).
Conjectures: a(5^k) = 781*5^(k-1) for k > 0. a(2^k) = 3*2^(k-1) for k > 1. If a(p) != a(p^2) for prime p > 2, then a(p^k) = p^(k-1)*a(p) for k > 0. - Chai Wah Wu, Feb 25 2022
MATHEMATICA
n=5; Table[p=i; a=Join[Table[ -1, {n-1}], {n}]; 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, 50}]
PROG
(Python)
from itertools import count
def A106297(n):
a = b = (5%n, 1%n, 7%n, 3%n, 15%n)
s = sum(b) % n
for m in count(1):
b, s = b[1:] + (s, ), (s+s-b[0]) % n
if a == b:
return m # Chai Wah Wu, Feb 22-27 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, May 02 2005, Nov 19 2006
STATUS
approved