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!)
A000229 a(n) is the least number m such that the n-th prime is the least quadratic nonresidue modulo m.
(Formerly M2684 N1074)
12
3, 7, 23, 71, 311, 479, 1559, 5711, 10559, 18191, 31391, 422231, 701399, 366791, 3818929, 9257329, 22000801, 36415991, 48473881, 175244281, 120293879, 427733329, 131486759, 3389934071, 2929911599, 7979490791, 36504256799, 23616331489, 89206899239, 121560956039 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Note that a(n) is always a prime q > prime(n).
For n > 1, a(n) = prime(k), where k is the smallest number such that A053760(k) = prime(n).
One could make a case for setting a(1) = 2, but a(1) = 3 seems more in keeping with the spirit of the sequence.
a(n) is the smallest odd prime q such that prime(n)^((q-1)/2) == -1 (mod q) and b^((q-1)/2) == 1 (mod q) for every natural base b < prime(n). - Thomas Ordowski, May 02 2019
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
N. J. A. Sloane, Table of n, a(n) for n = 1..38 (from the web page of Tomás Oliveira e Silva)
H. J. Godwin, On the least quadratic non-residue, Proc. Camb. Phil. Soc., 61 (3) (1965), 671-672.
A. J. Hanson, G. Ortiz, A. Sabry and Y.-T. Tai, Discrete Quantum Theories, arXiv preprint arXiv:1305.3292 [quant-ph], 2013.
A. J. Hanson, G. Ortiz, A. Sabry, Y.-T. Tai, Discrete quantum theories, (a different version). (To appear in J. Phys. A: Math. Theor., 2014).
Tomás Oliveira e Silva, Least primitive root of prime numbers
Yu-Tsung Tai, Discrete Quantum Theories and Computing, Ph.D. thesis, Indiana University (2019).
EXAMPLE
a(2) = 7 because the second prime is 3 and 3 is the least quadratic nonresidue modulo 7, 14, 17, 31, 34, ... and 7 is the least of these.
MATHEMATICA
leastNonRes[p_] := For[q = 2, True, q = NextPrime[q], If[JacobiSymbol[q, p] != 1, Return[q]]]; a[1] = 3; a[n_] := For[pn = Prime[n]; k = 1, True, k++, an = Prime[k]; If[pn == leastNonRes[an], Print[n, " ", an]; Return[an]]]; Array[a, 20] (* Jean-François Alcover, Nov 28 2015 *)
CROSSREFS
Cf. A020649, A025021, A053760, A307809. For records see A133435.
Differs from A002223, A045535 at 12th term.
Sequence in context: A066768 A225914 A062241 * A133435 A079061 A228724
KEYWORD
nonn,nice
AUTHOR
EXTENSIONS
Definition corrected by Melvin J. Knight (MELVIN.KNIGHT(AT)ITT.COM), Dec 08 2006
Name edited by Thomas Ordowski, May 02 2019
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 April 20 05:55 EDT 2024. Contains 371799 sequences. (Running on oeis4.)