login
A094928
Let p = n-th prime == 1 mod 8 (A007519); a(n) = smallest prime q such that p is not a square mod q.
4
3, 3, 5, 3, 5, 3, 3, 5, 3, 7, 3, 3, 5, 5, 3, 3, 7, 5, 3, 5, 3, 3, 5, 3, 7, 3, 3, 5, 3, 7, 3, 3, 3, 3, 5, 3, 3, 11, 5, 3, 3, 11, 5, 3, 11, 3, 7, 3, 5, 7, 3, 3, 3, 3, 7, 3, 3, 7, 5, 3, 3, 5, 5, 11, 5, 3, 3, 5, 5, 3, 7, 5, 3, 5, 3, 7, 3, 7, 3, 5, 3, 3, 3, 5, 11, 5, 3, 5, 3, 3, 13, 5, 3, 3, 3, 3, 5, 5, 3, 5, 3, 7
OFFSET
1,1
REFERENCES
M. Kneser, Quadratische Formen, Springer, 2002; see Hilfssatz 18.3.
LINKS
FORMULA
a(n) = A094929(A269704(n)). - Robert Israel, May 06 2019
EXAMPLE
n=3, p = 73, a(3) = q = 5: Legendre(73,5) = -1.
MAPLE
f:= proc(p) local q;
q:= 3:
do
if numtheory:-quadres(p, q) = -1 then return q fi;
q:= nextprime(q);
od;
end proc:
map(f, select(isprime, [seq(p, p=1..10000, 8)])); # Robert Israel, May 06 2019
MATHEMATICA
f[n_] := Prime[ Position[ JacobiSymbol[n, Select[Range[3, n - 1], PrimeQ[ # ] &]], -1][[1, 1]] + 1]; f /@ Select[ Prime[ Range[435]], Mod[ #, 8] == 1 &] (* Robert G. Wilson v, Jun 23 2004 *)
CROSSREFS
Subsequence of A094929.
Sequence in context: A014780 A216199 A073081 * A178984 A065507 A182731
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jun 19 2004
EXTENSIONS
More terms from Robert G. Wilson v, Jun 23 2004
STATUS
approved