login
A002224
Smallest prime p of form p = 8k+1 such that first n primes (p_1=2, ..., p_n) are quadratic residues mod p.
(Formerly M5040 N2176)
13
17, 73, 241, 1009, 2689, 8089, 33049, 53881, 87481, 483289, 515761, 1083289, 3818929, 3818929, 9257329, 22000801, 48473881, 48473881, 175244281, 427733329, 427733329, 898716289, 8114538721, 9176747449, 23616331489, 23616331489, 23616331489, 196265095009, 196265095009, 196265095009, 196265095009, 2871842842801, 2871842842801, 2871842842801, 26437680473689
OFFSET
1,1
REFERENCES
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
A. E. Western and J. C. P. Miller, Tables of Indices and Primitive Roots. Royal Society Mathematical Tables, Vol. 9, Cambridge Univ. Press, 1968, p. XV.
LINKS
D. H. Lehmer, A sieve problem on "pseudo-squares", Math. Tables Other Aids Comp., 8 (1954), 241-242.
D. H. Lehmer, E. Lehmer and D. Shanks, Integer sequences having prescribed quadratic character, Math. Comp., 24 (1970), 433-451.
D. H. Lehmer, E. Lehmer and D. Shanks, Integer sequences having prescribed quadratic character, Math. Comp., 24 (1970), 433-451 [Annotated scanned copy]
A. E. Western and J. C. P. Miller, Tables of Indices and Primitive Roots, Royal Society Mathematical Tables, Vol. 9, Cambridge Univ. Press, 1968 [Annotated scans of selected pages]
EXAMPLE
32^2 = 2 mod 73, 21^2 = 3 mod 73.
MATHEMATICA
f[n_] := Block[{k = 2}, While[JacobiSymbol[n, Prime[k]] == 1, k++ ]; Prime[k]] (* Robert G. Wilson v *)
np[] := While[p = NextPrime[p]; Mod[p, 8] != 1]; p = 2; A002224 = {}; pp = {2}; np[]; While[Length[A002224] < 25, If[Union[JacobiSymbol[#, p] &[pp]] === {1}, AppendTo[pp, NextPrime[Last[pp]]]; Print[p]; AppendTo[A002224, p], np[]]]; A002224 (* Jean-François Alcover, Sep 09 2011 *)
PROG
(PARI) a(n, startAt=17)=my(v=primes(n)); forprime(p=startAt, , if(p%8>1, next); for(i=1, n, if(kronecker(v[i], p)<1, next(2))); return(p)) \\ Charles R Greathouse IV, Jun 26 2017
CROSSREFS
KEYWORD
nonn,nice,changed
EXTENSIONS
More terms from Don Reble, Sep 19 2001
More terms from Mike Oakes, Nov 28 2022
STATUS
approved