OFFSET
1,1
COMMENTS
If k is a term, the Pell equation x^2 - k*y^2 = -1 has a solution [Dirichlet, Newman (1977)]. This is only a sufficient condition, there are many other solutions, see A031396.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
Morris Newman, A note on an equation related to the Pell equation, The American Mathematical Monthly 84.5 (1977): 365-366.
PROG
(Python)
from sympy.ntheory import legendre_symbol, factorint
A323271_list, k = [], 1
while len(A323271_list) < 10000:
fk, fv = zip(*list(factorint(4*k+1).items()))
if sum(fv) == len(fk) == 3 and fk[0] % 4 == fk[1] % 4 == fk[2] % 4 == 1 and legendre_symbol(fk[0], fk[1]) == legendre_symbol(fk[0], fk[2]) == legendre_symbol(fk[1], fk[2]) == -1:
A323271_list.append(4*k+1)
k += 1 # Chai Wah Wu, Jan 11 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jan 11 2019
STATUS
approved