OFFSET
1,1
COMMENTS
Primes that are 1, 3, 5, 9, or 15 mod 22. - Charles R Greathouse IV, Mar 18 2018
REFERENCES
Helmut Hasse, Number Theory, Grundlehren 229, Springer, 1980, page 498.
LINKS
FORMULA
a(n) ~ 2n log n. - Charles R Greathouse IV, Mar 18 2018
MAPLE
# In the quadratic field Q(sqrt(D)), for squarefree D<0, compute lists of:
# rational primes that decompose (SD),
# rational primes that are inert (SI),
# primes p such that D is a square mod p (QR), and
# primes p such that D is a nonsquare mod p (NR),
# omitting the latter if it is the same as the inert primes.
# Consider first M primes p.
# Reference: Helmut Hasse, Number Theory, Grundlehren 229, Springer, 1980, page 498.
with(numtheory):
HH := proc(D, M)
local SD, SI, QR, NR, p, q, i, t1;
# if D >= 0 then error("D must be negative"); fi;
if not issqrfree(D) then
error("D must be squarefree");
end if;
q:=-D;
SD:=[]; SI:=[]; QR:=[]; NR:=[];
if (D mod 8) = 1 then
SD:=[op(SD), 2];
end if;
if (D mod 8) = 5 then
SI:=[op(SI), 2];
end if;
for i from 2 to M do
p:=ithprime(i);
if (D mod p) <> 0 and legendre(D, p)=1 then
SD:=[op(SD), p];
end if;
if (D mod p) <> 0 and legendre(D, p)=-1 then
SI:=[op(SI), p];
end if;
end do;
for i from 1 to M do
p:=ithprime(i);
if legendre(D, p) >= 0 then
QR:=[op(QR), p];
else
NR:=[op(NR), p];
end if;
end do:
lprint("Primes that decompose:", SD);
lprint("Inert primes:", SI);
lprint("Primes p such that Legendre(D, p) = 0 or 1: ", QR);
if SI <> NR then
lprint("Note: SI <> NR here!");
lprint("Primes p such that Legendre(D, p) = -1: ", NR);
end if;
end proc:
MATHEMATICA
Reap[For[p = 2, p < 1000, p = NextPrime[p], If[KroneckerSymbol[-11, p] == 1, Print[p]; Sow[p]]]][[2, 1]] (* Jean-François Alcover, Apr 29 2019 *)
PROG
(PARI) list(lim)=my(v=List()); forprime(p=2, lim, if(kronecker(-11, p)==1, listput(v, p))); Vec(v) \\ Charles R Greathouse IV, Mar 18 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Dec 25 2017
STATUS
approved