%I #55 Feb 27 2022 10:22:21
%S 1,3,13,10,781,728,137257,36,273,212784,28531167061,42640
%N Period of the Fibonacci n-step sequence mod n.
%C From _Chai Wah Wu_, Feb 23 2022: (Start)
%C a(14) = 92269645680
%C a(15) = 4976066589192413
%C a(16) = 136
%C a(18) = 306281976
%C (End)
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Fibonaccin-StepNumber.html">Fibonacci n-Step Number</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PisanoPeriod.html">Pisano Period</a>
%F From _Chai Wah Wu_, Feb 22 2022: (Start)
%F Conjecture 1: a(p) = (p^p-1)/(p-1) for p prime, i.e., a(A000040(n)) = A001039(n).
%F Conjecture 2: a(2^k) = 2^(k-1)*(1+2^k) = A007582(k).
%F Conjecture 3 (which implies Conjectures 1 and 2): a(p^k) = (p^(p*k)-1)*p^(k-1)/(p^k-1) for k > 0 and prime p.
%F (End)
%e For n = 4, take the tetranacci sequence (A000078), 0, 0, 0, 1, 1, 2, 4, 8, 15, 29, 56, 108, 208, ... (mod 4), which gives 0, 0, 0, 1, 1, 2, 0, 0, 3, 1, 0, 0, 0, 1, 1, 2, ... This repeats a pattern of length 10, so a(4) = 10.
%o (Python)
%o from math import lcm
%o from itertools import count
%o from sympy import factorint
%o def f(n,pe): # period of the Fibonacci n-step sequence mod pe
%o a = b = (0,)*(n-1)+(1%pe,)
%o s = 1 % pe
%o for m in count(1):
%o b, s = b[1:] + (s,), (s+s-b[0]) % pe
%o if a == b:
%o return m
%o def A351657(n): return 1 if n == 1 else lcm(*(f(n,p**e) for p, e in factorint(n).items())) # _Chai Wah Wu_, Feb 23-27 2022
%Y Cf. A000040, A001039, A001175, A007582, A046738, A106295, A106303.
%K nonn,more
%O 1,2
%A _Ilya Gutkovskiy_, Feb 16 2022
%E a(11)-a(12) from _Chai Wah Wu_, Feb 22 2022