login
A078332
First prime such that p^2 == -1 (mod n), or 0 if no such prime exists.
0
2, 3, 0, 0, 2, 0, 0, 0, 0, 3, 0, 0, 5, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 7, 5, 0, 0, 17, 0, 0, 0, 0, 13, 0, 0, 31, 0, 0, 0, 73, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 23, 0, 0, 0, 0, 17, 0, 0, 11, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 173, 31, 0, 0, 0, 0, 0, 0, 0, 73, 0, 0, 13, 0, 0, 0, 233, 0, 0, 0, 0, 0, 0
OFFSET
1,1
EXAMPLE
a(2)=3 as 3^2 == -1 (mod 2).
PROG
(PARI) for (n=1, 100, f=true; forprime(p=2, 1000, if (p^2%n==(n-1), print1(p", "); f=false; break)); if (f==true, print1(0", ")))
CROSSREFS
Sequence in context: A021817 A167613 A319753 * A097109 A160018 A175099
KEYWORD
nonn
AUTHOR
Jon Perry, Nov 21 2002
STATUS
approved