OFFSET
1,1
EXAMPLE
a(38) = 41 because row 38 of A373751 starts 41, 43, 47, ..., which are the primes that are quadratic residues modulo 163.
MAPLE
a := proc(n) local a, p; a := 1; p := ithprime(n); while true do a := a + 1;
if NumberTheory:-QuadraticResidue(a, p) = 1 and isprime(a) then return a fi od end: seq(a(n), n = 1..85);
PROG
(PARI) a(n) = my(p=prime(n), q=2); while (!issquare(Mod(q, p)), q=nextprime(q+1)); q; \\ Michel Marcus, Jun 29 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, Jun 29 2024
STATUS
approved