OFFSET
3,1
MATHEMATICA
f[n_] := Block[{k = 2}, While[ JacobiSymbol[n, Prime[k]] == 1, k++ ]; Prime[k]]; f /@ Prime[Range[3, 100]] (* Robert G. Wilson v, Jun 24 2004 *)
PROG
(PARI) a(n) = {my(p=prime(n), q=3); while (!issquare(Mod(p, q)), q = nextprime(q+1)); q; } \\ Michel Marcus, May 06 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jun 19 2004
STATUS
approved