Find square and triangular numbers

75 Views Asked by At

Square and triangular numbers are expressed as

$n^2=\frac{m(m+1)}{2}$

Further on this can be expressed as

$8n^2=4m(m+1)=4m^2+4m=(2m+1)^2-1$

Taking $a=2m+1$ and $b=2n$ the expression becomes

$2b^2=a^2-1$ or $1=a^2-2b^2$

After a bit of factoring previous equation becomes

$1=(a-\sqrt{2}b)(a+\sqrt{2}b)$

One of the solutions is $(a,b)=(3,2)$ and $(m,n)=(1,1)$. From here additional solutions can be found recursively.

Once there is a solution say $(m,n)$ there is another $(1+im+jn, 1+km+ln)$ for some integers $i,j,k,l$. I need help proving this.