login
A104480
Numbers m such that the period length P(m) of the Fibonacci sequence modulo m is a perfect square.
1
1, 7, 17, 21, 25, 34, 68, 97, 119, 127, 133, 136, 152, 175, 189, 238, 266, 275, 323, 337, 343, 357, 378, 381, 391, 399, 425, 437, 475, 476, 505, 525, 532, 544, 577, 608, 621, 625, 646, 647, 679, 707, 714, 749, 755, 756, 782, 798, 850, 864, 874, 889, 950, 952
OFFSET
1,2
COMMENTS
144 appears to be the most common perfect square.
LINKS
EXAMPLE
Let P(n) be the period length of the modulo n Fibonacci sequence (also called the Pisano period). Then {P(n)}=1,3,8,6,20,24,16,12,... and a(2)=7 because the second perfect square in {P(n)} occurs when n=7.
MAPLE
pisano:= proc(n) option remember; local f, F, k;
F:= ifactors(n)[2];
if nops(F)<>1 then ilcm(seq(procname(k[1]^k[2]), k=F))
else
f:= [0, 1];
for k from 1 do f:=[f[2], f[1]+f[2] mod n];
if f=[0, 1] then return k fi
od;
fi
end:
select(t -> issqr(pisano(t)), [$1..1000]); # Robert Israel, Jun 13 2025
MATHEMATICA
t = {1}; Do[a = {1, 0}; a0 = a; k = 0; While[k++; s = Mod[Plus @@ a, n]; a = RotateLeft[a]; a[[2]] = s; a != a0]; If[IntegerQ[Sqrt[k]], AppendTo[t, n]], {n, 2, 1000}]; t (* T. D. Noe, Aug 08 2012 *)
CROSSREFS
Cf. A001175.
Sequence in context: A234095 A354168 A287182 * A053746 A327830 A144695
KEYWORD
nonn
AUTHOR
William C. Brown (wcbrow00(AT)centre.edu), Apr 18 2005
STATUS
approved