OFFSET
1,2
COMMENTS
a(n) == 2 (mod 3) for n >= 2.
EXAMPLE
a(3) = 11 because 11 is a quadratic residue mod 2, a nonresidue mod 3, a residue mod 5, but a residue mod 7, and no smaller number works.
MAPLE
with(numtheory):
N:= 20:
V:= Vector(N): V[1]:= 1: count:= 1:
for x from 2 by 3 while count < N do
p:= 1:
for m from 0 do
p:= nextprime(p);
if numtheory:-quadres(x, p) <> (-1)^m then break fi;
od;
if V[m] = 0 then
V[m]:= x; count:= count+1;
fi
od:
convert(V, list);
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, Oct 27 2024
STATUS
approved