OFFSET
1,1
COMMENTS
Number of terms less than or equal to 10^k for k=0 .. : 0, 1, 8, 71, 712, 6702, 63485, 602870, ... . - Robert G. Wilson v, Jul 20 2008
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..63485
J. P. Robertson and K. R. Matthews, A continued fraction approach to a result of Feit, Amer. Math. Monthly, 115 (No. 4, 2008), 346-349.
Eric Weisstein's World of Mathematics, Pell Equation.
EXAMPLE
3^2 - 10*1^2 = -1, so 10 is a member.
4005^2 - 106*389^2 = -1, so 106 is a member.
MATHEMATICA
lst = {}; Do[ If[ !PrimeQ@ n && FindInstance[x^2 - n*y^2 == -1, {x, y}, Integers] != {}, AppendTo[lst, n]], {n, 2, 1000}]
PROG
(Python)
from itertools import count, islice
from sympy.solvers.diophantine.diophantine import diop_DN
from sympy import isprime
def A137351_gen(startvalue=1): # generator of terms >= startvalue
return filter(lambda n: not isprime(n) and len(diop_DN(n, -1)), count(max(startvalue, 4)))
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Apr 08 2008
EXTENSIONS
More terms from Robert G. Wilson v, Jul 20 2008
STATUS
approved
