|
EXAMPLE
|
47 is here because the 29th tribonacci number, 15902591, is the first tribonacci number divisible by 47 and 47^2 also divides it. Similarly, 617^2 divides T(409) and 2693^2 divides T(10553).
|
|
MATHEMATICA
|
FibonacciZero[n_, kMax_, m_] := Module[{a, s, k}, a=Join[{1}, Table[0, {n-1}]]; a=Mod[a, m]; k=0; While[k++; s=Mod[Plus@@a, m]; a=RotateLeft[a]; a[[n]]=s; s>0&&k<kMax]; If[s==0, k, -1]]; Do[p=Prime[n]; zero=FibonacciZero[3, Infinity, p]; If[zero==FibonacciZero[3, zero, p^2], Print[{p, zero}]], {n, 1000}]
|