login

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 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) is the Pisano period of prime(n)^2.
1

%I #4 Apr 05 2021 20:41:32

%S 6,24,100,112,110,364,612,342,1104,406,930,2812,1640,3784,1504,5724,

%T 3422,3660,9112,4970,10804,6162,13944,3916,19012,5050,21424,7704,

%U 11772,8588,32512,17030,37812,6394,22052,7550,49612,53464,56112,60204,31862,16290,36290

%N a(n) is the Pisano period of prime(n)^2.

%F a(n) = A001175(A001248(n)).

%o (PARI) \\ After _Charles R Greathouse IV_ in A001175 (Start)

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

%o entryp(p)=my(k=p+[0, -1, 1, 1, -1][p%5+1], f=factor(k)); for(i=1, #f[, 1], for(j=1, f[i, 2], if((Mod([1, 1; 1, 0], p)^(k/f[i, 1]))[1, 2], break); k/=f[i, 1])); k

%o entry(n)=if(n==1, return(1)); my(f=factor(n), v); v=vector(#f~, i, if(f[i, 1]>1e14, entryp(f[i, 1]^f[i, 2]), entryp(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 a001175(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 \\ (End)

%o a(n) = my(p=prime(n)); a001175(p^2)

%Y Cf. A001175, A001248, A060305.

%K nonn

%O 1,1

%A _Felix Fröhlich_, Apr 05 2021