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

Let p = n-th odd prime. Then a(n) = least prime congruent to 5 modulo 8 such that Legendre(a(n), q) = -1 for all odd primes q <= p.
(Formerly M4012 N1663)
5

%I M4012 N1663 #33 Feb 21 2019 15:07:42

%S 5,53,173,173,293,2477,9173,9173,61613,74093,74093,74093,170957,

%T 360293,679733,2004917,2004917,69009533,138473837,237536213,384479933,

%U 883597853,1728061733,1728061733,1728061733,1728061733

%N Let p = n-th odd prime. Then a(n) = least prime congruent to 5 modulo 8 such that Legendre(a(n), q) = -1 for all odd primes q <= p.

%C All terms are congruent to 5 mod 24. - _Jianing Song_, Feb 17 2019

%C Also a(n) is the least prime r congruent to 5 mod 8 such that the first n odd primes are quadratic nonresidues modulo r. Note that r == 5 (mod 8) implies 2 is a quadratic nonresidue modulo r. See A001986 for the case where r == 3 (mod 8). - _Jianing Song_, Feb 19 2019

%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H Michael John Jacobson, Jr., <a href="http://hdl.handle.net/1993/18862">Computational Techniques in Quadratic Fields</a>, Master's thesis, University of Manitoba, Winnipeg, Manitoba, 1995.

%H Michael John Jacobson Jr. and Hugh C. Williams, <a href="https://doi.org/10.1090/S0025-5718-02-01418-7">New quadratic polynomials with high densities of prime values</a>, Math. Comp. 72 (2003), 499-519.

%H D. H. Lehmer, E. Lehmer and D. Shanks, <a href="https://doi.org/10.1090/S0025-5718-1970-0271006-X">Integer sequences having prescribed quadratic character</a>, Math. Comp., 24 (1970), 433-451. [There is an error in the table given in this paper.]

%H D. H. Lehmer, E. Lehmer and D. Shanks, <a href="/A002189/a002189.pdf">Integer sequences having prescribed quadratic character</a>, Math. Comp., 24 (1970), 433-451 [Annotated scanned copy]

%o (PARI) isok(p, oddpn) = {forprime(q=3, oddpn, if (kronecker(p, q) != -1, return (0));); return (1);}

%o a(n) = {my(oddpn = prime(n+1)); forprime(p=3, , if ((p%8) == 5, if (isok(p, oddpn), return (p));););} \\ _Michel Marcus_, Oct 17 2017

%Y Cf. A094851, A094852, A094853.

%Y Cf. A001986 (the congruent to 3 mod 8 case), A001987, A094845, A094846.

%Y See A094847, A094848, A094849, A094850 for the case where the terms are not restricted to the primes.

%K nonn

%O 1,1

%A _N. J. A. Sloane_

%E Corrected and extended by _N. J. A. Sloane_, Jun 14 2004