OFFSET
1,3
COMMENTS
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
T. D. Noe, Table of n, a(n) for n = 1..10000
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
KEYWORD
nonn,easy,nice
AUTHOR
EXTENSIONS
More terms from David W. Wilson
STATUS
approved