OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
P:= select(isprime, [seq(i, i=7..3000, 8)]):
f:= proc(n) local p, q;
p:= P[n]; q:= 2;
while numtheory:-quadres(p, q)=1 do q:= nextprime(q) od;
q
end proc:
map(f, [$1..nops(P)]); # Robert Israel, Mar 13 2020
MATHEMATICA
f[n_] := Block[{k = 2}, While[ JacobiSymbol[n, Prime[k]] == 1, k++ ]; Prime[k]]; f /@ Select[ Prime[ Range[435]], Mod[ #, 8] == 7 &]
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Jun 24 2004
STATUS
approved