In 1778 [[Leonhard Euler]] determined the explicit formula<ref name=Dickson>
{{cite book | last1 = Dickson | first1 = Leonard Eugene | authorlink1author-link1 = Leonard Eugene Dickson |title = [[History of the Theory of Numbers]] | volume = 2 | publisher = American Mathematical Society | ___location = Providence | year = 1999 |origyearorig-year = 1920 | page = 16 | isbn = 978-0-8218-1935-7 }}
</ref><ref name=Euler>
{{cite journal |last=Euler |first=Leonhard |authorlinkauthor-link=Leonhard Euler |year=1813 |title=Regula facilis problemata Diophantea per numeros integros expedite resolvendi (An easy rule for Diophantine problems which are to be resolved quickly by integral numbers) |journal=Mémoires de l'Académie des Sciences de St.-Pétersbourg |volume= 4 |pages=3–17 |url=http://math.dartmouth.edu/~euler/pages/E739.html |language=Latinla |accessdateaccess-date=2009-05-11 |quote=According to the records, it was presented to the St. Petersburg Academy on May 4, 1778.}}
</ref>{{Rp|12–13}}
:<math>N_k = \left( \frac{\left(3 + 2\sqrt{2}\right)^k - \left(3 - 2\sqrt{2}\right)^k}{4\sqrt{2}} \right)^2.
==Pell's equation==
The problem of finding square triangular numbers reduces to [[Pell's equation]] in the following way.<ref>
{{cite book | last1 = Barbeau | first1 = Edward | title = Pell's Equation | pages = [https://archive.org/details/pellsequation0000barb/page/16 16]–17 | url=https://archive.org/details/pellsequation0000barb | url-access = registration | accessdateaccess-date = 2009-05-10 |series = Problem Books in Mathematics | publisher = Springer | ___location = New York | year = 2003 | isbn = 978-0-387-95529-2 }}
</ref>
which is an instance of [[Pell's equation]]. This particular equation is solved by the [[Pell number]]s {{math|''P''<sub>''k''</sub>}} as<ref>
{{cite book |last1=Hardy |first1=G. H. |authorlink1author-link1=G. H. Hardy |last2=Wright |first2=E. M. |authorlink2author-link2=E. M. Wright |title=An Introduction to the Theory of Numbers |edition=5th |year=1979 |publisher=Oxford University Press |isbn=0-19-853171-0 |page=[https://archive.org/details/introductiontoth00hard/page/210 210] |quote=Theorem 244 |url-access=registration |url=https://archive.org/details/introductiontoth00hard/page/210 }}
</ref>
All square triangular numbers have the form {{math|''b''<sup>2</sup>''c''<sup>2</sup>}}, where {{math|{{sfrac|''b''|''c''}}}} is a [[Convergent (continued fraction)|convergent]] to the [[continued fraction|continued fraction expansion]] of [[square root of 2|{{sqrt|2}}]].<ref name=Ball>
{{cite book | last1 = Ball | first1 = W. W. Rouse |authorlink1author-link1 = W. W. Rouse Ball | last2 = Coxeter | first2 = H. S. M. |authorlink2author-link2 = Harold Scott MacDonald Coxeter | title = Mathematical Recreations and Essays | url = https://archive.org/details/mathematicalrecr00coxe | url-access = limited | publisher = Dover Publications | ___location = New York | year = 1987 | page = [https://archive.org/details/mathematicalrecr00coxe/page/n72 59]| isbn = 978-0-486-25357-2 }}
</ref>
The generating function for the square triangular numbers is:<ref>
{{cite web |first=Simon |last=Plouffe |authorlinkauthor-link=Simon Plouffe |title=1031 Generating Functions |url=http://www.lacim.uqam.ca/%7Eplouffe/articles/FonctionsGeneratrices.pdf |publisher=University of Quebec, Laboratoire de combinatoire et d'informatique mathématique |page=A.129 |format=PDF |date=August 1992 |accessdateaccess-date=2009-05-11 }}
</ref>
:<math>\frac{1+z}{(1-z)\left(z^2 - 34z + 1\right)} = 1 + 36z + 1225 z^2 + \cdots</math>
|