A000229 a(n) is the least number m such that the n-th prime is the least quadratic nonresidue modulo m.
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
Offset: 1
Examples
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.
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
- Hans Salié, Uber die kleinste Primzahl, die eine gegebene Primzahl als kleinsten positiven quadratischen Nichtrest hat, Math. Nachr. 29 (1965) 113-114.
- Yu-Tsung Tai, Discrete Quantum Theories and Computing, Ph.D. thesis, Indiana University (2019).
Crossrefs
Programs
-
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 *)
Extensions
Definition corrected by Melvin J. Knight (MELVIN.KNIGHT(AT)ITT.COM), Dec 08 2006
Name edited by Thomas Ordowski, May 02 2019
Comments