OFFSET
1,2
COMMENTS
For all n, a(n) | n.
Conjecture (Saha & Karthik): a(n) = 1 only for n = 1, 6, and 12.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Arpan Saha and C. S. Karthik, A few equivalences of Wall-Sun-Sun prime conjecture, arXiv:1102.1636 [math.NT], 2011.
MATHEMATICA
pp[1] = 1; pp[n_] := For[k = 1, True, k++, If[Mod[Fibonacci[k], n] == 0 && Mod[Fibonacci[k+1], n] == 1, Return[k]]];
a[n_] := pp[n^2]/pp[n];
Array[a, 100] (* Jean-François Alcover, Dec 04 2018 *)
PROG
(PARI) fibmod(n, m)=((Mod([1, 1; 1, 0], m))^n)[1, 2]
entry_p(p)=my(k=1, c=Mod(1, p), o); while(c, [o, c]=[c, c+o]; k++); k
entry(n)=if(n==1, return(1)); my(f=factor(n), v); v=vector(#f~, i, if(f[i, 1]>1e14, entry_p(f[i, 1]^f[i, 2]), entry_p(f[i, 1])*f[i, 1]^(f[i, 2] - 1))); if(f[1, 1]==2&&f[1, 2]>1, v[1]=3<<max(f[1, 2]-2, 1)); lcm(v)
per(n)=if(n==1, return(1)); my(k=entry(n)); forstep(i=k, n^2, k, if(fibmod(i-1, n)==1, return(i)))
a(n)=per(n^2)/per(n)
CROSSREFS
KEYWORD
nonn
AUTHOR
Charles R Greathouse IV, Feb 13 2014
STATUS
approved