login
A031399
Numbers n with no 4k+3 factors such that the Pell equation x^2 - n y^2 = -1 is insoluble.
2
4, 8, 16, 20, 25, 32, 34, 40, 52, 64, 68, 80, 100, 104, 116, 128, 136, 146, 148, 160, 164, 169, 178, 194, 200, 205, 208, 212, 221, 232, 244, 256, 260, 272, 289, 292, 296, 305, 320, 328, 340, 356, 377, 386, 388, 400, 404, 410, 416, 424, 436, 452
OFFSET
1,1
REFERENCES
"Advanced Number Theory" by Harvey Cohn.
PROG
(Python)
from itertools import count, islice
from sympy import primefactors
from sympy.solvers.diophantine.diophantine import diop_DN
def A031399_gen(startvalue=1): # generator of terms >= startvalue
return filter(lambda n: not (any(p&3==3 for p in primefactors(n)) or len(diop_DN(n, -1))), count(max(startvalue, 1)))
A031399_list = list(islice(A031399_gen(), 50)) # Chai Wah Wu, Dec 22 2025
CROSSREFS
KEYWORD
nonn
STATUS
approved