For squares of triangular numbers, see squared triangular number

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 perfect square. There are infinitely many square triangular numbers; the first few are:

0, 1, 36, 7003122500000000000♠ 1 225 , 7004416160000000000♠ 41 616 , 7006141372100000000♠ 1 413 721 , 7007480249000000000♠ 48 024 900 , 7009163143288100000♠ 1 631 432 881 , 7010554206930560000♠ 55 420 693 056 , 7012188267213102500♠ 1 882 672 131 025 (sequence A001110 OEIS)

Explicit formulas [ edit ]

Write N k for the kth square triangular number, and write s k and t k for the sides of the corresponding square and triangle, so that

N k = s k 2 = t k ( t k + 1 ) 2 . {\displaystyle N_{k}=s_{k}^{2}={\frac {t_{k}(t_{k}+1)}{2}}.}

Define the triangular root of a triangular number N = n(n + 1)/2 to be n. From this definition and the quadratic formula,

n = 8 N + 1 − 1 2 . {\displaystyle n={\frac {{\sqrt {8N+1}}-1}{2}}.}

Therefore, N is triangular (n is an integer) if and only if 8N + 1 is square. Consequently, a square number M2 is also triangular if and only if 8M2 + 1 is square, that is, there are numbers x and y such that x2 − 8y2 = 1. This is an instance of the Pell equation with n = 8. All Pell equations have the trivial solution x = 1, y = 0 for any n; this is called the zeroth solution, and indexed as (x 0 , y 0 ) = (1,0). If (x k , y k ) denotes the kth nontrivial solution to any Pell equation for a particular n, it can be shown by the method of descent that

x k + 1 = 2 x k x 1 − x k − 1 , y k + 1 = 2 y k x 1 − y k − 1 . {\displaystyle {\begin{aligned}x_{k+1}&=2x_{k}x_{1}-x_{k-1},\\y_{k+1}&=2y_{k}x_{1}-y_{k-1}.\end{aligned}}}

Hence there are an infinity of solutions to any Pell equation for which there is one non-trivial one, which holds whenever n is not a square. The first non-trivial solution when n = 8 is easy to find: it is (3,1). A solution (x k , y k ) to the Pell equation for n = 8 yields a square triangular number and its square and triangular roots as follows:

s k = y k , t k = x k − 1 2 , N k = y k 2 . {\displaystyle s_{k}=y_{k},\quad t_{k}={\frac {x_{k}-1}{2}},\quad N_{k}=y_{k}^{2}.}

Hence, the first square triangular number, derived from (3,1), is 1, and the next, derived from 6 × (3,1) − (1,0) = (17,6), is 36.

The sequences N k , s k and t k are the OEIS sequences OEIS: A001110, OEIS: A001109, and OEIS: A001108 respectively.

In 1778 Leonhard Euler determined the explicit formula[1][2]:12–13

N k = ( ( 3 + 2 2 ) k − ( 3 − 2 2 ) k 4 2 ) 2 . {\displaystyle N_{k}=\left({\frac {\left(3+2{\sqrt {2}}\right)^{k}-\left(3-2{\sqrt {2}}\right)^{k}}{4{\sqrt {2}}}}\right)^{2}.}

Other equivalent formulas (obtained by expanding this formula) that may be convenient include

N k = 1 32 ( ( 1 + 2 ) 2 k − ( 1 − 2 ) 2 k ) 2 = 1 32 ( ( 1 + 2 ) 4 k − 2 + ( 1 − 2 ) 4 k ) = 1 32 ( ( 17 + 12 2 ) k − 2 + ( 17 − 12 2 ) k ) . {\displaystyle {\begin{aligned}N_{k}&={\tfrac {1}{32}}\left(\left(1+{\sqrt {2}}\right)^{2k}-\left(1-{\sqrt {2}}\right)^{2k}\right)^{2}\\&={\tfrac {1}{32}}\left(\left(1+{\sqrt {2}}\right)^{4k}-2+\left(1-{\sqrt {2}}\right)^{4k}\right)\\&={\tfrac {1}{32}}\left(\left(17+12{\sqrt {2}}\right)^{k}-2+\left(17-12{\sqrt {2}}\right)^{k}\right).\end{aligned}}}

The corresponding explicit formulas for s k and t k are:[2]:13

s k = ( 3 + 2 2 ) k − ( 3 − 2 2 ) k 4 2 , t k = ( 3 + 2 2 ) k + ( 3 − 2 2 ) k − 2 4 . {\displaystyle {\begin{aligned}s_{k}&={\frac {\left(3+2{\sqrt {2}}\right)^{k}-\left(3-2{\sqrt {2}}\right)^{k}}{4{\sqrt {2}}}},\\t_{k}&={\frac {\left(3+2{\sqrt {2}}\right)^{k}+\left(3-2{\sqrt {2}}\right)^{k}-2}{4}}.\end{aligned}}}

Pell's equation [ edit ]

The problem of finding square triangular numbers reduces to Pell's equation in the following way.[3]

Every triangular number is of the form t(t + 1)/2. Therefore we seek integers t, s such that

t ( t + 1 ) 2 = s 2 . {\displaystyle {\frac {t(t+1)}{2}}=s^{2}.}

Rearranging, this becomes

( 2 t + 1 ) 2 = 8 s 2 + 1 , {\displaystyle \left(2t+1\right)^{2}=8s^{2}+1,}

and then letting x = 2t + 1 and y = 2s, we get the Diophantine equation

x 2 − 2 y 2 = 1 , {\displaystyle x^{2}-2y^{2}=1,}

which is an instance of Pell's equation. This particular equation is solved by the Pell numbers P k as[4]

x = P 2 k + P 2 k − 1 , y = P 2 k ; {\displaystyle x=P_{2k}+P_{2k-1},\quad y=P_{2k};}

and therefore all solutions are given by

s k = P 2 k 2 , t k = P 2 k + P 2 k − 1 − 1 2 , N k = ( P 2 k 2 ) 2 . {\displaystyle s_{k}={\frac {P_{2k}}{2}},\quad t_{k}={\frac {P_{2k}+P_{2k-1}-1}{2}},\quad N_{k}=\left({\frac {P_{2k}}{2}}\right)^{2}.}

There are many identities about the Pell numbers, and these translate into identities about the square triangular numbers.

Recurrence relations [ edit ]

There are recurrence relations for the square triangular numbers, as well as for the sides of the square and triangle involved. We have[5]:(12)

N k = 34 N k − 1 − N k − 2 + 2 , with N 0 = 0 and N 1 = 1 ; N k = ( 6 N k − 1 − N k − 2 ) 2 , with N 0 = 0 and N 1 = 1. {\displaystyle {\begin{aligned}N_{k}&=34N_{k-1}-N_{k-2}+2,&{\text{with }}N_{0}&=0{\text{ and }}N_{1}=1;\\N_{k}&=\left(6{\sqrt {N_{k-1}}}-{\sqrt {N_{k-2}}}\right)^{2},&{\text{with }}N_{0}&=0{\text{ and }}N_{1}=1.\end{aligned}}}

We have[1][2]:13

s k = 6 s k − 1 − s k − 2 , with s 0 = 0 and s 1 = 1 ; t k = 6 t k − 1 − t k − 2 + 2 , with t 0 = 0 and t 1 = 1. {\displaystyle {\begin{aligned}s_{k}&=6s_{k-1}-s_{k-2},&{\text{with }}s_{0}&=0{\text{ and }}s_{1}=1;\\t_{k}&=6t_{k-1}-t_{k-2}+2,&{\text{with }}t_{0}&=0{\text{ and }}t_{1}=1.\end{aligned}}}

Other characterizations [ edit ]

All square triangular numbers have the form b2c2, where b/c is a convergent to the continued fraction for the √2.[6]

A. V. Sylwester gave a short proof that there are an infinity of square triangular numbers, to wit:[7]

If the nth triangular number n(n + 1)/2 is square, then so is the larger 4n(n + 1)th triangular number, since:

( 4 n ( n + 1 ) ) ( 4 n ( n + 1 ) + 1 ) 2 = 4 n ( n + 1 ) 2 ( 2 n + 1 ) 2 . {\displaystyle {\frac {{\bigl (}4n(n+1){\bigr )}{\bigl (}4n(n+1)+1{\bigr )}}{2}}=4\,{\frac {n(n+1)}{2}}\,\left(2n+1\right)^{2}.}

We know this result has to be a square, because it is a product of three squares: 4, n(n + 1)/2 (the original square triangular number), and (2n + 1)2.

The triangular roots t k are alternately simultaneously one less than a square and twice a square if k is even, and simultaneously a square and one less than twice a square if k is odd. Thus,

49 = 72 = 2 × 52 − 1, 288 = 172 − 1 = 2 × 122, and 1681 = 412 = 2 × 292 − 1.

In each case, the two square roots involved multiply to give s k : 5 × 7 = 35, 12 × 17 = 204, and 29 × 41 = 1189.[citation needed]

Additionally:

N k − N k − 1 = s 2 k − 1 ; {\displaystyle N_{k}-N_{k-1}=s_{2k-1};}

36 − 1 = 35, 1225 − 36 = 1189, and 41616 − 1225 = 40391. In other words, the difference between two consecutive square triangular numbers is the square root of another square triangular number.[citation needed]

The generating function for the square triangular numbers is:[8]

1 + z ( 1 − z ) ( z 2 − 34 z + 1 ) = 1 + 36 z + 1225 z 2 + ⋯ {\displaystyle {\frac {1+z}{(1-z)\left(z^{2}-34z+1\right)}}=1+36z+1225z^{2}+\cdots }

Numerical data [ edit ]

As k becomes larger, the ratio t k /s k approaches √2 ≈ 7000141421356000000♠1.41421356, and the ratio of successive square triangular numbers approaches (1 + √2)4 = 17 + 12√2 ≈ 7001339705627480000♠33.970562748. The table below shows values of k between 0 and 11, which comprehend all square triangular numbers up to 7016100000000000000♠1016.

k N k s k t k t k / s k N k / N k − 1 0 0 0 0 1 1 1 1 1 2 36 6 8 7000133333333000000♠ 1.333 333 33 36 3 7003122500000000000♠ 1 225 35 49 1.4 7001340277777780000♠ 34.027 777 778 4 7004416160000000000♠ 41 616 204 288 7000141176471000000♠ 1.411 764 71 7001339722448980000♠ 33.972 244 898 5 7006141372100000000♠ 1 413 721 7003118900000000000♠ 1 189 7003168100000000000♠ 1 681 7000141379310000000♠ 1.413 793 10 7001339706122650000♠ 33.970 612 265 6 7007480249000000000♠ 48 024 900 7003693000000000000♠ 6 930 7003980000000000000♠ 9 800 7000141414141000000♠ 1.414 141 41 7001339705642060000♠ 33.970 564 206 7 7009163143288100000♠ 1 631 432 881 7004403910000000000♠ 40 391 7004571210000000000♠ 57 121 7000141420118000000♠ 1.414 201 18 7001339705627910000♠ 33.970 562 791 8 7010554206930560000♠ 55 420 693 056 7005235416000000000♠ 235 416 7005332928000000000♠ 332 928 7000141421144000000♠ 1.414 211 44 7001339705627500000♠ 33.970 562 750 9 7012188267213102500♠ 1 882 672 131 025 7006137210500000000♠ 1 372 105 7006194044900000000♠ 1 940 449 7000141421320000000♠ 1.414 213 20 7001339705627490000♠ 33.970 562 749 10 7013639554317617960♠ 63 955 431 761 796 7006799721400000000♠ 7 997 214 7007113097680000000♠ 11 309 768 7000141421350000000♠ 1.414 213 50 7001339705627480000♠ 33.970 562 748 11 7015217260200777004♠ 2 172 602 007 770 041 7007466111790000000♠ 46 611 179 7007659181610000000♠ 65 918 161 7000141421355000000♠ 1.414 213 55 7001339705627480000♠ 33.970 562 748

See also [ edit ]

Cannonball problem, on numbers that are simultaneously square and square pyramidal

Sixth power, numbers that are simultaneously square and cubical