The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A001988 Let p be the n-th odd prime. a(n) is the least prime congruent to 7 modulo 8 such that Legendre(-a(n), q) = -Legendre(-1, q) for all odd primes q <= p.
(Formerly M4333 N1888)
2
7, 7, 127, 463, 463, 487, 1423, 33247, 73327, 118903, 118903, 118903, 454183, 773767, 773767, 773767, 773767, 86976583, 125325127, 132690343, 788667223, 788667223, 1280222287, 2430076903, 10703135983, 10703135983, 10703135983 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Numbers so far are all congruent to 7 (mod 24). - Ralf Stephan, Jul 07 2003
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).
LINKS
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]
PROG
(PARI) isok(p, oddpn) = {forprime(q=3, oddpn, if (kronecker(p, q) != -kronecker(-1, q), return (0)); ); return (1); }
a(n) = {oddpn = prime(n+1); forprime(p=3, , if ((p%8) == 7, if (isok(p, oddpn), return (p)); ); ); } \\ Michel Marcus, Oct 18 2017
(Python)
from sympy import legendre_symbol as L, primerange, prime, nextprime
def isok(p, oddpn):
for q in primerange(3, oddpn + 1):
if L(p, q)!=-L(-1, q): return 0
return 1
def a(n):
oddpn=prime(n + 1)
p=3
while True:
if p%8==7:
if isok(p, oddpn): return p
p=nextprime(p) # Indranil Ghosh, Oct 23 2017, after PARI code by Michel Marcus
CROSSREFS
Cf. A001990.
Sequence in context: A065240 A178708 A072399 * A099739 A261128 A353583
KEYWORD
nonn
AUTHOR
EXTENSIONS
Better name and more terms from Sean A. Irvine, Mar 06 2013
Name and offset corrected by Michel Marcus, Oct 18 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 8 15:56 EDT 2024. Contains 373223 sequences. (Running on oeis4.)