OFFSET
1,2
COMMENTS
Row n contains recursive mappings of A001175(x) starting with x = n.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10141 (rows n = 1..2500, flattened)
Brennan Benfield and Oliver Lippard, Fixed points of K-Fibonacci sequences, arXiv:2404.08194 [math.NT], 2024.
J. D. Fulton and W. L. Morris, On arithmetical functions related to the Fibonacci numbers, Acta Arithmetica, 16 (1969), 105-110.
Wikipedia, Pisano period
EXAMPLE
Table begins:
1;
2, 3, 8, 12, 24;
3, 8, 12, 24;
4, 6, 24;
5, 20, 60, 120;
6, 24;
7, 16, 24;
8, 12, 24;
9, 24;
10, 60, 120;
11, 10, 60, 120;
12, 24;
...
MATHEMATICA
q[{0, 1, _}] := False; q[_] := True;
f[k_][{a_, b_, c_}] := {Mod[b, k], Mod[a + b, k], c + 1};
s[1] := 1; s[k_] := s[k] = Which[
PrimeQ[k] && k > 5, If[
AnyTrue[PrimitiveRootList[k], Mod[#^2, k] == Mod[# + 1, k] &],
k - 1,
NestWhile[f[k], {1, 1, 1}, q][[-1]] ],
PrimePowerQ[k], NestWhile[f[k], {1, 1, 1}, q][[-1]], True,
LCM @@ Map[s[#] &, Power @@@ FactorInteger[k] ] ];
Table[Most@ FixedPointList[s[#] &, n], {n, 24}]
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Michael De Vlieger, Dec 30 2024
STATUS
approved