234px|thumb|Square triangular number 36 depicted as a triangular number and as a square number.
In mathematics, a square triangular number (or triangular square number) is a number which is both a triangular number and a square number, in other words, the sum of all integers from <math>1</math> to <math>n</math> has a square root that is an integer. There are infinitely many square triangular numbers; the first few are:
{| class="wikitable" style="margin:auto auto auto auto; front-size:95%; float:right;"
|-
! N <br> A001110 !! s<sup>2</sup> = N <br> A001109 !! t(t+1)/2 = N <br> A001108
|-
| 0 || 0 || 0
|-
| 1 || 1 || 1
|-
| 36 || 6 || 8
|-
| 1225 || 35 || 49
|-
| 41616 || 204 || 288
|-
| 1413721 || 1189 || 1681
|-
| 48024900 || 6930 || 9800
|}
Solution as a Pell equation
Write <math>N_k</math> for the <math>k</math>th square triangular number, and write <math>s_k</math> and <math>t_k</math> for the sides of the corresponding square and triangle, so that
Define the triangular root of a triangular number <math>N=\tfrac{n(n+1)}{2}</math> to be <math>n</math>. In the form of the quadratic equation, <math>n^2 + n - 2N = 0</math>. From the quadratic formula,
Therefore, <math>N</math> is triangular (<math>n</math> is an integer) if and only if <math>8N+1</math> is square. Consequently, a square number <math>M^2</math> is also triangular if and only if <math>8M^2+1</math> is square, that is, there are numbers <math>x</math> and <math>y</math> such that <math>x^2-8y^2=1</math>. This is an instance of the Pell equation <math>x^2-ny^2=1</math> with <math>n=8</math>. All Pell equations have the trivial solution <math>x=1,y=0</math> for any <math>n</math>; this is called the zeroth solution, and indexed as <math>(x_0,y_0)=(1,0)</math>. If <math>(x_k,y_k)</math> denotes the <math>k</math>th nontrivial solution to any Pell equation for a particular <math>n</math>, it can be shown by the method of descent that the next solution is
Hence there are infinitely many solutions to any Pell equation for which there is one non-trivial one, which is true whenever <math>n</math> is not a square. The first non-trivial solution when <math>n=8</math> is easy to find: it is <math>(3,1)</math>. A solution <math>(x_k,y_k)</math> to the Pell equation for <math>n=8</math> yields a square triangular number and its square and triangular roots as follows:
Hence, the first square triangular number, derived from <math>(3,1)</math>, is <math>1</math>, and the next, derived from <math>6\cdot (3,1)-(1,0)=(17,6)</math>, is <math>36</math>.
The sequences <math>N_k</math>, <math>s_k</math> and <math>t_k</math> are the OEIS sequences , , and respectively.
Explicit formula
In 1778 Leonhard Euler determined the explicit formula
\right)^2.
</math>
Other equivalent formulas (obtained by expanding this formula) that may be convenient include
The corresponding explicit formulas for <math>s_k</math> and <math>t_k</math> are:
- \sqrt{N_{k-2\right)^2,& \text{with }N_0 &= 0\text{ and }N_1 = 1.
\end{align}</math>
We have
A. V. Sylwester gave a short proof that there are infinitely many square triangular numbers: If the <math>n</math>th triangular number <math>\tfrac{n(n+1)}{2}</math> is square, then so is the larger <math>4n(n+1)</math>th triangular number, since:
The left hand side of this equation is in the form of a triangular number, and as the product of three squares, the right hand side is square.
The generating function for the square triangular numbers is:
:<math>\frac{1+z}{(1-z)\left(z^2 - 34z + 1\right)} = 1 + 36z + 1225 z^2 + \cdots</math>
See also
- Cannonball problem, on numbers that are simultaneously square and square pyramidal
- Sixth power, numbers that are simultaneously square and cubical
Notes
External links
- Triangular numbers that are also square at cut-the-knot
- Michael Dummett's solution
