TOPICS
Search

Square Triangular Number


A number which is simultaneously square and triangular. Let T_n denote the nth triangular number and S_m the mth square number, then a number which is both triangular and square satisfies the equation T_n=S_m, or

 1/2n(n+1)=m^2.
(1)

Completing the square gives

1/2(n^2+n)=1/2(n+1/2)^2-(1/2)(1/4)
(2)
=m^2
(3)
1/8(2n+1)^2-1/8=m^2
(4)
(2n+1)^2-8m^2=1.
(5)

Therefore, defining

x=2n+1
(6)
y=2m
(7)

gives the Pell equation

 x^2-2y^2=1
(8)

(Conway and Guy 1996). The first few solutions are (x,y)=(3,2), (17, 12), (99, 70), (577, 408), .... These give the solutions (n,m)=(1,1), (8, 6), (49, 35), (288, 204), ... (OEIS A001108 and A001109), corresponding to the triangular square numbers 1, 36, 1225, 41616, 1413721, 48024900, ... (OEIS A001110; Pietenpol 1962). In 1730, Euler showed that there are an infinite number of such solutions (Dickson 2005).

The general formula for a square triangular number ST_n is b^2c^2, where b/c is the nth convergent to the continued fraction of sqrt(2) (Ball and Coxeter 1987, p. 59; Conway and Guy 1996). The first few are

 1/1,3/2,7/5,(17)/(12),(41)/(29),(99)/(70),(239)/(169),...
(9)

(OEIS A001333 and A000129). The numerators and denominators can also be obtained by doubling the previous fraction and adding to the fraction before that.

A general formula for square triangular numbers is

ST_n=[((1+sqrt(2))^(2n)-(1-sqrt(2))^(2n))/(4sqrt(2))]^2
(10)
=1/(32)[(17+12sqrt(2))^n+(17-12sqrt(2))^n-2].
(11)

The square triangular numbers also satisfy the recurrence relation

 ST_n=34ST_(n-1)-ST_(n-2)+2.
(12)

A second-order recurrence for ST_n=u_n^2 is given by

 u_(n+2)=6u_(n+1)-u_n,
(13)

with u_0=0 and u_1=1. A first-order recurrence equation is given by

 u_(n+1)=3u_n+sqrt(8u_n^2+1)
(14)

(M. Carreira, pers. comm., Sept. 29, 2003).

A curious product formula for ST_n is given by

 ST_n=2^(2n-5)product_(k=1)^(2n)[3+cos((kpi)/n)].
(15)

An amazing generating function is

 f(x)=(x(x+1))/((1-x)(1-34x+x^2))=x+36x^2+1225x^3+...
(16)

(Sloane and Plouffe 1995).

Taking the square and triangular numbers together gives the sequence 1, 1, 3, 4, 6, 9, 10, 15, 16, 21, 25, ... (OEIS A005214; Hofstadter 1996, p. 15).


See also

Cubic Triangular Number, Pentagonal Square Number, Pentagonal Square Triangular Number, Square Number, Square Root, Triangular Number

Explore with Wolfram|Alpha

References

Allen, B. M. "Squares as Triangular Numbers." Scripta Math. 20, 213-214, 1954.Ball, W. W. R. and Coxeter, H. S. M. Mathematical Recreations and Essays, 13th ed. New York: Dover, 1987.Conway, J. H. and Guy, R. K. The Book of Numbers. New York: Springer-Verlag, pp. 203-205, 1996.Dickson, L. E. History of the Theory of Numbers, Vol. 2: Diophantine Analysis. New York: Dover, pp. 10, 16, and 27, 2005.Guy, R. K. "Sums of Squares" and "Figurate Numbers." §C20 and §D3 in Unsolved Problems in Number Theory, 2nd ed. New York: Springer-Verlag, pp. 136-138 and 147-150, 1994.Hofstadter, D. R. Fluid Concepts & Creative Analogies: Computer Models of the Fundamental Mechanisms of Thought. New York: Basic Books, 1996.Khatri, M. N. "Triangular Numbers Which are Also Squares." Math. Student 27, 55-56, 1959.Pietenpol, J. L. "Square Triangular Numbers." Problem E 1473. Amer. Math. Monthly 69, 168-169, 1962.Potter, D. C. D. "Triangular Square Numbers." Math. Gaz. 56, 109-110, 1972.Sengupta, D. "Digits in Triangular Squares." College Math. J. 30, 31, 1999.Sierpiński, W. Teoria Liczb, 3rd ed. Warsaw, Poland: Monografie Matematyczne t. 19, p. 517, 1950.Sierpiński, W. "Sur les nombres triangulaires carrés." Pub. Faculté d'Électrotechnique l'Université Belgrade, No. 65, 1-4, 1961.Sierpiński, W. "Sur les nombres triangulaires carrés." Bull. Soc. Royale Sciences Liège, 30 ann., 189-194, 1961.Silverman, J. H. A Friendly Introduction to Number Theory. Englewood Cliffs, NJ: Prentice Hall, 1996.Sloane, N. J. A. Sequences A000129/M1413, A001333/M2665, A001108/M4536, A001109/M4217, and A001110/M5259 in "The On-Line Encyclopedia of Integer Sequences."Sloane, N. J. A. and Plouffe, S. The Encyclopedia of Integer Sequences. San Diego: Academic Press, 1995.Walker, G. W. "Triangular Squares." Problem E 954. Amer. Math. Monthly 58, 568, 1951.

Referenced on Wolfram|Alpha

Square Triangular Number

Cite this as:

Weisstein, Eric W. "Square Triangular Number." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/SquareTriangularNumber.html

Subject classifications