The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A097152 Smallest prime p greater than n for which n is a quadratic residue mod p. 2
 7, 11, 5, 11, 19, 19, 17, 11, 13, 19, 13, 17, 31, 17, 17, 19, 23, 31, 29, 37, 29, 29, 29, 29, 37, 37, 29, 53, 37, 41, 41, 37, 37, 43, 37, 41, 43, 41, 41, 43, 47, 53, 53, 59, 53, 53, 59, 53, 71, 59, 53, 59, 67, 67, 61, 59, 61, 67, 61, 73, 67, 83, 67, 67, 97, 73, 83, 73, 73, 73 (list; graph; refs; listen; history; text; internal format)
 OFFSET 2,1 LINKS David A. Corneth, Table of n, a(n) for n = 2..10001 Eric Weisstein's World of Mathematics, Quadratic Residue. MATHEMATICA f[n_] := Block[{k = PrimePi[n]}, While[ JacobiSymbol[ n, Prime[k]] != 1, k++ ]; Prime[ k]]; Table[ f[n], {n, 2, 60}] PROG (PARI) a(n) = forprime(p = n + 1, oo, if(issquare(Mod(n, p)), return(p))) \\ Peter Schorn, May 13 2020 CROSSREFS Cf. A097143. Sequence in context: A050081 A144076 A113492 * A212769 A269485 A228954 Adjacent sequences:  A097149 A097150 A097151 * A097153 A097154 A097155 KEYWORD nonn,easy AUTHOR Robert G. Wilson v, Jul 27 2004 STATUS approved

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

Last modified January 26 04:04 EST 2022. Contains 350572 sequences. (Running on oeis4.)