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”).

First prime such that p^2==1 (mod n).
0

%I #4 Mar 31 2012 13:21:55

%S 2,3,2,3,11,5,13,3,17,11,23,5,53,13,11,7,67,17,37,11,13,23,47,5,101,

%T 53,53,13,59,11,61,17,23,67,29,17,73,37,53,11,83,13,173,23,19,47,281,

%U 7,97,101,67,53,107,53,89,13,37,59,353,11,367,61,71,31,79,23,269,67,47,29

%N First prime such that p^2==1 (mod n).

%e a(2)=3 because 3^2=9==1 (mod 2), while 2^2==0 (mod 2).

%o (PARI) for (n=1,100, forprime(p=2,1000,if ((p^2-1)%n==0,print1(p","); break)))

%K nonn

%O 1,1

%A _Jon Perry_, Nov 21 2002