A097160 Greatest prime p such that there are n, but not n+1, consecutive quadratic residues mod p, or -1 if no such prime exists.
5, 17, 53, 193, 457, 2153
Offset: 1
Examples
Only the first three primes have no consecutive quadratic residues, so a(1) is the third prime, 5. 53 has three consecutive quadratic resides, but not four; and each larger prime has four consecutives.
References
- Alfred Brauer, Ueber Sequenzen von Potenzresten, S.-B. Deutsch. Akad. Wiss. Berlin 1928, 9-16.
Links
- D. H. Lehmer and Emma Lehmer, On Runs of Residues, Proc. Amer. Math. Soc, Vol. 13, No. 1 (Feb., 1962), pp. 102-106.
- Don Reble, Comments on A097160
Programs
-
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_] := g[n] = f[ JacobiSymbol[ Range[ Prime[n] - 1], Prime[n]], 1][[1]]; g[1] = 1; a = Table[0, {30}]; Do[ a[[ g[n]]] = n, {n, 2556}]; Prime[a]
Extensions
The old values of a(7) and a(8) were unproved, while a(9) and a(10) were wrong (and are still unknown), according to email message from Don Reble received by N. J. A. Sloane, Dec 11 2015, see LINKS.
Comments