The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A237836 Pisano period of n^2. 1

%I

%S 1,6,24,24,100,24,112,96,216,300,110,24,364,336,600,384,612,216,342,

%T 600,336,330,1104,96,2500,1092,1944,336,406,600,930,1536,1320,612,

%U 2800,216,2812,342,2184,2400,1640,336,3784,1320,5400,1104,1504,384,5488,7500

%N Pisano period of n^2.

%H Charles R Greathouse IV, <a href="/A237836/b237836.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A001175(n^2).

%o (PARI) fibmod(n, m)=((Mod([1, 1; 1, 0], m))^n)[1, 2]

%o entry_p(p)=my(k=1, c=Mod(1, p), o); while(c, [o, c]=[c, c+o]; k++); k

%o 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)

%o 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)))

%o a(n)=per(n^2)

%Y Cf. A001175, A001176, A237517, A237835.

%K nonn

%O 1,2

%A _Charles R Greathouse IV_, Feb 13 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified December 2 05:01 EST 2021. Contains 349437 sequences. (Running on oeis4.)