A106290 Number of different orbit lengths of the 5-step recursion mod n.
1, 3, 4, 4, 2, 9, 2, 6, 7, 6, 2, 11, 2, 6, 8, 8, 2, 9, 3, 8, 8, 6, 4, 12, 3, 6, 10, 8, 3, 18, 2, 10, 8, 6, 4, 11, 2, 6, 8, 12, 2, 18, 4, 8, 14, 9, 4, 16, 3, 9, 8, 8, 2, 12, 4, 12, 10, 6, 3, 22
Offset: 1
Links
- Eric Weisstein's World of Mathematics, Fibonacci n-Step Number.
Crossrefs
Programs
-
Python
from itertools import count,product def A106290(n): bset, tset = set(), set() for t in product(range(n),repeat=5): t2 = t for c in count(1): t2 = t2[1:] + (sum(t2)%n,) if t == t2: bset.add(c) tset.add(t) break if t2 in tset: tset.add(t) break return len(bset) # Chai Wah Wu, Feb 22 2022
Comments