login
A376999
a(n) is the least number k that is a quadratic residue modulo prime(n) but is a quadratic nonresidue modulo all previous odd primes.
0
0, 5, 2, 38, 17, 83, 362, 167, 227, 2273, 398, 5297, 64382, 69467, 116387, 238262, 214037, 430022, 5472953, 9481097, 8062073, 41941577, 86374763, 312521282
OFFSET
2,2
EXAMPLE
a(5) = 38 because 38 is a quadratic residue modulo prime(5) = 11 but is not a quadratic residue modulo the previous odd primes 3, 5 and 7, and no number smaller than 38 works.
MAPLE
f:= proc(n) local k, p;
p:= 2;
for k from 2 do
p:= nextprime(p);
if numtheory:-quadres(n, p) = 1 then return k fi
od
end proc:
V:= Array(2..25): count:= 0:
for k from 2 while count < 24 do
v:= f(k);
if v > 0 and v <= 25 and V[v] = 0 then
V[v]:= k; count:= count+1;
fi;
od:
V[2]:= 0:
convert(V, list);
CROSSREFS
Cf. A377212.
Sequence in context: A095998 A328555 A208927 * A099612 A233044 A142599
KEYWORD
nonn
AUTHOR
Robert Israel, Oct 20 2024
STATUS
approved