editing
approved
editing
approved
Consecutive quadratic residues mod p: a(n)= is the maximal number of positive reduced quadratic residues which appear consecutively for n-th prime.
T. D. Noe, <a href="/A002307/b002307.txt">Table of n, a(n) for n = 1..10000</a>
approved
editing
proposed
approved
editing
proposed
editing
proposed
editing
proposed
A. A. Bennett, Consecutive quadratic residues, Bull. Amer. Math. Soc., 32 (1926), 283-284.
A. A. Bennett, <a href="http://dx.doi.org/10.1090/S0002-9904-1926-04211-7">Consecutive quadratic residues</a>, Bull. Amer. Math. Soc., 32 (1926), 283-284.
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]]; Table[ g[n], {n, 2, 102}] (from * _Robert G. Wilson v _, Jul 28 2004 *)
proposed
editing
editing
proposed