cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A106290 Number of different orbit lengths of the 5-step recursion mod n.

This page as a plain text file.
%I A106290 #23 Feb 16 2025 08:32:57
%S A106290 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,
%T A106290 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
%N A106290 Number of different orbit lengths of the 5-step recursion mod n.
%C A106290 Consider the 5-step recursion x(k) = (x(k-1)+x(k-2)+x(k-3)+x(k-4)+x(k-5)) mod n. For any of the n^5 initial conditions x(1), x(2), x(3), x(4) and x(5) in Zn, the recursion has a finite period. Each of these n^5 vectors belongs to exactly one orbit. In general, there are only a few different orbit lengths for each n. For n=8, there are 6 different lengths: 1, 2, 3, 6, 12 and 24. The maximum possible length of an orbit is A106303(n), the period of the Fibonacci 5-step sequence mod n.
%H A106290 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Fibonaccin-StepNumber.html">Fibonacci n-Step Number</a>.
%o A106290 (Python)
%o A106290 from itertools import count,product
%o A106290 def A106290(n):
%o A106290     bset, tset = set(), set()
%o A106290     for t in product(range(n),repeat=5):
%o A106290         t2 = t
%o A106290         for c in count(1):
%o A106290             t2 = t2[1:] + (sum(t2)%n,)
%o A106290             if t == t2:
%o A106290                 bset.add(c)
%o A106290                 tset.add(t)
%o A106290                 break
%o A106290             if t2 in tset:
%o A106290                 tset.add(t)
%o A106290                 break
%o A106290     return len(bset) # _Chai Wah Wu_, Feb 22 2022
%Y A106290 Cf. A106287 (orbits of 5-step sequences), A106309 (primes that yield a simple orbit structure in 5-step recursions).
%K A106290 nonn,more
%O A106290 1,2
%A A106290 _T. D. Noe_, May 02 2005