The sum of two triangular numbers.

394 Views Asked by At

When triangular number is the square of an elementary formula is obtained. Sam got a couple of pieces, but I wonder how the formula looks opisyvayushaya sum of two triangular numbers is the square of an integer.

$X(X+1)+Y(Y+1)=Z^2$

So we have to find solutions to this Diophantine equation.

2

There are 2 best solutions below

0
On

For example in the equation: $X(X+1)+Y(Y+1)=Z^2$

If we use the solutions of Pell's equation: $p^2-2k(k-a)s^2=1$

Then the solution can be written, where the numbers $"a,k"$ whole and sets us.

$X=aps+(2k^2-ak-a^2)s^2$

$Y=-aps+(2k^2-3ak)s^2$

$Z=(2k-a)ps+a^2s^2$

More.

$X=-2p^2+(4k-3a)ps-(2k^2-3ak+a^2)s^2$

$Y=-2p^2+(4k-a)ps-(2k^2-ak)s^2$

$Z=2p^2-3(2k-a)ps+(4k^2-4ak+a^2)s^2$

0
On

It is necessary then to just write another equation:

$\frac{X(X+1)}{2}+\frac{Y(Y+1)}{2}=Z^2$

If we use the solutions of Pell's equation: $p^2-(2k^2+a^2)s^2=1$

formula for the solution can be written, where $k,a$ integers asked us.

$X=p^2+(4k-a)ps+2k(2k-a)s^2$

$Y=-aps-a(2k-a)s^2$

$Z=p^2+(3k-a)ps+k(2k-a)s^2$

And more.

$X=aps+(2k^2-2ak-a^2)s^2$

$Y=-aps-a(2k-a)s^2$

$Z=(k-a)ps+a(k+a)s^2$

Interestingly, and if you add three triangular numbers, the formula would look like?