- For squares of triangular numbers, see squared triangular number
A square triangular number (or triangular square number) is a number which is both a triangular number and a perfect square. There are an infinite number of triangular squares, given by the formula

or by the linear recursion
with
and 
The first few square triangular numbers are 1, 36, 1225, 41616, 1413721, 48024900, 1631432881, 55420693056, 1882672131025, ... (sequence A001110 in the OEIS)
The problem of finding square triangular numbers reduces to Pell's equation in the following way. Every triangular number is of the form n(n + 1)/2. Therefore we seek integers n, m such that

With a bit of algebra this becomes

and then letting k = 2n + 1 and h = 2m, we get the Diophantine equation

which is an instance of Pell's equation and is solved by the Pell numbers.
We get the recursion

Also, note that

since
and
.
The kth triangular square Nk is equal to the sth perfect square and the tth triangular number, such that


t is given by the formula
![{\displaystyle t(N_{k})={1 \over 4}\left[\left(\left(1+{\sqrt {2}}\right)^{k}+\left(1-{\sqrt {2}}\right)^{k}\right)^{2}-\left(1+(-1)^{k}\right)^{2}\right].}](https://wikimedia.org/api/rest_v1/media/math/render/svg/9a2c4cf0af56d886e17734c6baa71e0bdeaefa75)
or by the recursion

As k becomes larger, the ratio t/s approaches the square root of two: Also ratio of successive square triangulars converges to 17+12(sqrt(2))