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!)
A002308 Consecutive quadratic nonresidues mod p.
(Formerly M0274 N0097)
5
0, 1, 2, 2, 3, 4, 3, 4, 4, 3, 4, 4, 5, 5, 4, 6, 5, 6, 6, 6, 4, 6, 7, 6, 6, 5, 7, 6, 10, 4, 7, 8, 5, 5, 6, 7, 5, 6, 6, 5, 6, 6, 6, 5, 5, 6, 7, 7, 7, 6, 7, 6, 5, 7, 6, 7, 9, 7, 7, 7, 9, 5, 7, 10, 7, 7, 8, 7, 8, 6, 8, 8, 9, 5, 8, 8, 5, 8, 9, 7, 8, 12, 6, 7, 10, 8, 9, 9, 7, 8, 11, 12, 8, 8, 10, 8, 7, 6, 10, 10, 9, 7, 10, 9, 7, 6, 9 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
a(n) is the maximal number of positive reduced quadratic nonresidues which appear consecutively for the n-th prime.
When prime(n) == 3 (mod 4), then a(n) = A002307(n). - T. D. Noe, Apr 03 2007
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
A. A. Bennett, Consecutive quadratic residues, Bull. Amer. Math. Soc., 32 (1926), 283-284.
MATHEMATICA
f[l_, a_] := Module[{A = Split[l], B}, B = Last[Sort[ Cases[A, x : {a ..} :> {Length[x], Position[A, x][[1, 1]]}]]]; {First[B], Length[Flatten[Take[A, Last[B] - 1]]] + 1}]; g[n_] := f[-JacobiSymbol[Range[Prime[n] - 1], Prime[n]], 1][[1]]; g[1] = 0; Table[g[n], {n, 1, 107}] (* Jean-François Alcover, Oct 17 2012, after the Mathematica code of Robert G. Wilson v in A002307 *)
CROSSREFS
Cf. A002307.
Sequence in context: A014656 A003078 A165359 * A056796 A061295 A081742
KEYWORD
nonn,easy,nice
AUTHOR
EXTENSIONS
More terms from David W. Wilson
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 23 11:22 EDT 2024. Contains 371913 sequences. (Running on oeis4.)