# Find square and triangular numbers

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.

• Why do you say "previous equation has no integer solutions" when it clearly does (because you give the solution $a=3, b=2$ only two lines later)? – Gabriel Burns Oct 28 '16 at 17:46
• @GabrielBurns actually just the polynomial can't be expressed in integer terms – php-- Oct 28 '16 at 17:50
• It has something to do with "triangle" and "square" numbering of the elements of $mathbb N^2$. – hamam_Abdallah Oct 28 '16 at 17:54
• I don't think there are other solutions since the "triangle" numbering is faster than the square . – hamam_Abdallah Oct 28 '16 at 17:56
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}