login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Positive integers n such that the equation x^2 - n*y^2 = n*(n+1)/2 has integer solutions.
2

%I #57 Nov 21 2014 09:17:30

%S 1,3,8,9,17,19,24,25,33,49,51,57,67,72,73,81,88,89,96,97,99,121,129,

%T 136,147,152,163,169,177,179,193,201,211,225,233,241,243,249,264,288,

%U 289,297,313,337,339,352,361,369,387,393,408,409,441,449,451,456,457

%N Positive integers n such that the equation x^2 - n*y^2 = n*(n+1)/2 has integer solutions.

%C All odd squares are in this sequence. Proof: Set n = (2k + 1)^2, then we have x^2 - (2k + 1)^2 * y^2 = (2k + 1)^2 * (2k^2 + 2k + 1). Rearranging gives x^2 = (2k + 1)^2 * (y^2 + 2k^2 + 2k + 1). As 2k^2 + 2k + 1 is odd, a careful selection of y makes the RHS square. So [(2k+1) * (k(k + 1) + 1), k(k + 1)]. E.g., if k=2, then (5*7)^2 - 25*6^2 = 1225 - 900 = 325 = 25*26/2. - _Jon Perry_, Nov 07 2014

%C No even squares are in the sequence. Proof: Rearrange the equation to read x^2 = n(n + 1 + 2y^2)/2, with n = 4k^2. n + 1 + 2y^2 is always odd and so the RHS contains an odd exponent of 2, and therefore cannot be square. - _Jon Perry_, Nov 15 2014

%C From _Jon Perry_, Nov 15 2014: (Start)

%C Odd squares + 8 are always in this sequence. Proof: Let m = 4k^2 + 4k + 9 and let n = (m+1)/2 = 2k^2 + 2k + 5.

%C Rearranging the equation x^2 - m*y^2 = m(m + 1)/2, we get x^2 = m(m + 1 + 2y^2)/2, and so x^2 = m(n + y^2) = (4k^2 + 4k + 9)(2k^2 + 2k + 5 + y^2).

%C We aim to find a y such that the last bracket on the RHS is z^2 * (4k^2 + 4k + 9), so that x equals z*m. We claim that if we let Y = ((n-3)/2)^2*m - n, then Y is a square, and letting Y = y^2, we have y^2 + n = Y + n = z^2 * m as required, with z = (n-3)/2 = k^2 + k + 1.

%C To prove that Y is a square, Y = [(n^2 - 6n + 9)*(2n - 1) - 4n]/4 = [2n^3 - 13n^2 + 20n - 9]/4 = [(n-1)^2*(2n-9)]/4, and with n as it is, 2n - 9 = 4k^2 + 4k + 1 = (2k + 1)^2, and so we arrive at Y = [(n-1)^2*(2k+1)^2]/4 = [(n-1)(2k+1)/2]^2 = [(k^2 + k + 2)(2k + 1)]^2, a square as required, with y = (k^2 + k + 2)(2k + 1). Also GCD(n-3,2n-1)=1 as required.

%C This gives a solution as [(k^2 + k + 1)*(4k^2 + 4k + 9), (k^2 + k + 2)*(2k + 1)]. E.g., if k=4, n=45 and a solution is [21*89, 22*9] = [1869, 198]. To validate, 1869^2 - 89*198^2 = 3493161 - 3489156 = 4005 = 89*45.

%C (End)

%H Lars Blomberg, <a href="/A248194/b248194.txt">Table of n, a(n) for n = 1..10000</a>

%e 3 is in the sequence because x^2 - 3*y^2 = 6 has integer solutions, including (x, y) = (3, 1) and (9, 5).

%Y Cf. A134419, A245226.

%K nonn

%O 1,2

%A _Colin Barker_, Oct 03 2014

%E More terms from _Lars Blomberg_, Nov 02 2014

%E "Positive" added to definition by _N. J. A. Sloane_, Nov 02 2014