Triangular Numbers which are also Square

From ProofWiki
Jump to navigation Jump to search

Theorem

Let $A_n$ be the $n$th non-negative integer whose square is also a triangular number.

Then:

$A_n = \begin{cases} 0 & : n = 0 \\

1 & : n = 1 \\ 6 A_{n - 1} - A_{n - 2} & : n > 1 \end{cases}$


Sequence of Square Triangles

The sequence of triangular numbers which are also square begins:

$1, 36, 1225, 41 \, 616, 1 \, 413 \, 721, \ldots$

This sequence is A001110 in the On-Line Encyclopedia of Integer Sequences (N. J. A. Sloane (Ed.), 2008).


Their indices are:

$1, 8, 49, 288, 1681, 9800, \ldots$

This sequence is A001108 in the On-Line Encyclopedia of Integer Sequences (N. J. A. Sloane (Ed.), 2008).


Their roots are:

$1, 6, 35, 204, 1189, \ldots$

This sequence is A001109 in the On-Line Encyclopedia of Integer Sequences (N. J. A. Sloane (Ed.), 2008).


Proof

Let $n \in \Z_{>0}$ be such that $n^2$ is a triangular number.

Then we have:

\(\ds \exists m \in \Z_{>0}: \, \) \(\ds n^2\) \(=\) \(\ds \dfrac {m \paren {m + 1} } 2\) Closed Form for Triangular Numbers
\(\ds \leadstoandfrom \ \ \) \(\ds 2 n^2\) \(=\) \(\ds m^2 + m\)
\(\ds \) \(=\) \(\ds \dfrac {\paren {2 m + 1}^2 - 1} 4\) Completing the Square
\(\ds \leadstoandfrom \ \ \) \(\ds 8 n^2 + 1\) \(=\) \(\ds \paren {2 m + 1}^2\) simplifying
\(\ds \leadstoandfrom \ \ \) \(\ds x^2 - 8 y^2\) \(=\) \(\ds 1\) setting $x = 2 m + 1$ and $y = n$

This is a Pellian Equation.

From Pell's Equation: $x^2 - 8 y^2 = 1$, the smallest positive integral solution is:

$\tuple {x, y} = \tuple {3, 1}$

Thus we have that the sequence of $n$ such that $n^2$ is triangular is the sequence of numerators of the Continued Fraction Expansion of $\sqrt 8$ whose indices are even.


Let $\tuple {x, y} = \tuple {p_k, q_k}$ be a solution to $x^2 - 8 y^2 = 1$.

Then from Continued Fraction Expansion of $\sqrt 8$ we have:

\(\ds p_{k + 1}\) \(=\) \(\ds a_{k + 1} p_k + p_{k - 1}\)
\(\ds \) \(=\) \(\ds 4 p_k + p_{k - 1}\) as $a_{k + 1} = 4$
\(\ds p_{k + 2}\) \(=\) \(\ds a_{k + 2} p_{k + 1} + p_k\)
\(\ds \) \(=\) \(\ds p_{k + 1} + p_k\) as $a_{k + 2} = 1$
\(\ds \) \(=\) \(\ds 4 p_k + p_{k - 1} + p_k\) from above
\(\ds \) \(=\) \(\ds 5 p_k + p_{k - 1}\) simplfying
\(\ds p_{k + 3}\) \(=\) \(\ds a_{k + 3} p_{k + 2} + p_{k + 1}\)
\(\ds \) \(=\) \(\ds 4 p_{k + 2} + p_{k + 1}\) as $a_{k + 3} = 4$
\(\ds p_{k + 4}\) \(=\) \(\ds a_{k + 4} p_{k + 3} + p_{k + 2}\)
\(\ds \) \(=\) \(\ds p_{k + 3} + p_{k + 2}\) as $a_{k + 4} = 1$
\(\ds \) \(=\) \(\ds 4 p_{k + 2} + p_{k + 1} + p_{k + 2}\) from above
\(\ds \) \(=\) \(\ds 5 p_{k + 2} + p_{k + 1}\) simplifying
\(\ds \) \(=\) \(\ds 5 p_{k + 2} + \paren {p_{k + 2} - p_k}\) substituting for $p_{k + 1}$
\(\ds \) \(=\) \(\ds 6 p_{k + 2} + p_k\) simplifying

Hence the result.

$\blacksquare$


Sources