A245226 Values of n such that the equation x^2 - n*y^2 = n has integer solutions.
1, 2, 4, 5, 8, 9, 10, 13, 16, 17, 18, 20, 25, 26, 29, 32, 36, 37, 40, 41, 45, 49, 50, 52, 53, 58, 61, 64, 65, 68, 72, 73, 74, 80, 81, 82, 85, 89, 90, 97, 98, 100, 101, 104, 106, 109, 113, 116, 117, 121, 122, 125, 128, 130, 137, 144, 145, 148, 149, 153, 157
Offset: 1
Keywords
Examples
5 is in the sequence because x^2-5*y^2=5 has integer solutions, including (x,y) = (5,2) and (85,38).
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Select[Range[1,200],Solve[x^2==#*(1+y^2),{x,y},Integers]!={}&] (* Vaclav Kotesovec, Jul 15 2014 *)
-
PARI
isok(m) = if (issquare(4*m), 1, #qfbsolve(Qfb(1, 0, -m), m, 2)); \\ Michel Marcus, May 17 2025
Comments