login
A031396
Numbers k such that Pell equation x^2 - k*y^2 = -1 is soluble.
29
1, 2, 5, 10, 13, 17, 26, 29, 37, 41, 50, 53, 58, 61, 65, 73, 74, 82, 85, 89, 97, 101, 106, 109, 113, 122, 125, 130, 137, 145, 149, 157, 170, 173, 181, 185, 193, 197, 202, 218, 226, 229, 233, 241, 250, 257, 265, 269, 274, 277, 281, 290, 293, 298
OFFSET
1,2
COMMENTS
Terms are divisible neither by 4 nor by a prime of the form 4*k + 3 (although these conditions are not sufficient - compare A031398). - Lekraj Beedassy, Aug 17 2005
This is the set of integer solutions of all quadratic forms m^2*x^2 -/+ b*x + c with discriminant b^2 - 4*m^2*c = -4 where m is any term of A004613. - Klaus Purath, Jun 18 2025
From Jianing Song, Nov 04 2025: (Start)
Fact 1. If m is a term in this sequence, p is an odd prime factor of m, then m*p^2 is a term.
Proof. Let (x_0,y_0) be a solution to x^2 - m*y^2 = -1, x,y in Z satisfy (x + y*sqrt(m)) = (x_0 + y_0*sqrt(m))^p, then p|y, and x^2 - m*p^2*(y/p)^2 = (x_0^2 - m*y_0^2)^p = -1.
Fact 2. If m*p_i^2 is a term for distinct odd primes p_1,...,p_r not dividing m, then m*p_1^2*...*p_r^2 is a term.
Proof. Let (x_0,y_0) be the fundamental solution to x^2 - m*y^2 = -1; let (x_i,y_i) be a solution to x^2 - m*p_i^2*y^2 = -1. Then x_i + y_i*p_i*sqrt(m) = (x_0 + y_0*sqrt(m))^n_i for some odd n_i. Take x,y in Z such that x + y*sqrt(m) = (x_0 + y_0*sqrt(m))^n, where n = lcm(n_1,...,n_r), then x + y*sqrt(m) = (x_i + y_i*p_i*sqrt(m))^(n/n_i), so y is divisible by each p_i. We have x^2 - m*p_1^2*...*p_r^2*(y/(p_1*...*p_r))^2 = -1. (End)
REFERENCES
Harvey Cohn, "Advanced Number Theory".
LINKS
Ray Chandler, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe)
Dmitry Berdinsky and Prohrak Kruengthomya, Nonstandard Cayley automatic representations of fundamental groups, arXiv:2001.04743 [math.GR], 2020.
Dmitry Berdinsky and Prohrak Kruengthomya, Nonstandard Cayley Automatic Representations for Fundamental Groups of Torus Bundles over the Circle, Int'l Conf. Lang. Automata Theory Appl. (LATA 2020), Lect. Notes Comp. Sci., Vol 12038. Springer, Cham, 115-127.
Hsin-Te Chiang, Mei-Ru Ciou, Chia-Ling Tsai, Yuh-Jenn Wu, and Chiun-Chang Lee, On negative Pell equations: Solvability and unsolvability in integers, Notes Num. Theory Disc. Math. (2018) Vol. 24, No. 3, 10-26.
Steven R. Finch, Class number theory [Cached copy, with permission of the author]
Dinesh Khurana and T. Y. Lam, Invertible commutators in matrix rings, J. Alg. Appl., 10 (2011), 51-71.
K. Lakshmi and R. Someshwari, On The Negative Pell Equation y^2 = 72x^2 - 23, Int'l J. Emerg. Tech. Eng. Res. (IJETER 2016), Vol.4, Issue 7.
Morris Newman, A note on an equation related to the Pell equation, The American Mathematical Monthly 84.5 (1977): 365-366.
V. Sangeetha, T. Anupreethi, and S. Manju Somanath, Ramanujan Primes and Negative Pell's Equation, Optimality (2025) Vol. 2, No. 4, 271-279. See p. 272.
R. Suganya and D. Maheswari, On the Negative Pellian Equation y^2 = 110 * x^2 - 29, J. Math. Informatics (2017) Vol. 11, 63-71.
A. Vijayasankar, M. A. Gopalan, and V. Krithika, On The Negative Pell Equation y^2 = 112 * x^2 - 7, International Journal of Engineering and Applied Sciences (IJEAS 2017), Vol. 4, Issue 7, 11-14.
MATHEMATICA
fQ[n_] := Solve[x^2 + 1 == n*y^2, {x, y}, Integers] != {}; Select[ Range@ 300, fQ] (* Robert G. Wilson v, Dec 19 2013 *)
PROG
(SageMath)
def is_A031396(k):
if k==1: return True
if Integer(k).is_square(): return False
K.<a> = QuadraticField(k)
return continued_fraction(a).period_length()%2
print([k for k in range(1, 1000) if is_A031396(k)]) # Robin Visser, Nov 02 2024
(Python)
from itertools import count
from sympy.solvers.diophantine.diophantine import diop_DN
def A031396_gen(startvalue=1): # generator of terms >= startvalue
return filter(lambda n: len(diop_DN(n, -1)), count(max(startvalue, 1))) # Chai Wah Wu, Dec 21 2025
CROSSREFS
Equals {1} U A003814.
Cf. A031398, A002313, A133204, A130226 (values of x).
See also A322781, A323271, A323272.
Sequence in context: A020893 A281292 A145017 * A003814 A003654 A271787
KEYWORD
nonn
STATUS
approved