encyclopegia.org

Square triangular number

In mathematics, a square triangular number (or triangular square number) is a number which is both a triangular number and a square number, in other words, the sum of all integers from 1 to n has a square root that is an integer. There are infinitely many square triangular numbers; the first few are:

In mathematics, a square triangular number (or triangular square number) is a number which is both a triangular number and a square number, in other words, the sum of all integers from 1 to n has a square root that is an integer. There are infinitely many square triangular numbers; the first few are: ==Solution as a Pell equation== Write N_k for the k th square triangular number, and write s_k and t_k for the sides of the corresponding square and triangle, so that Define the triangular root of a triangular number N=\tfrac{n(n+1)}{2} to be n . In the form of the quadratic equation, n^2 + n - 2N = 0 . From the quadratic formula, {{bi|left=1.6| \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 M^2 is also triangular if and only if 8M^2+1 is square, that is, there are numbers x and y such that x^2-8y^2=1 . This is an instance of the Pell equation x^2-ny^2=1 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 k th nontrivial solution to any Pell equation for a particular n , it can be shown by the method of descent that the next solution is Hence there are infinitely many solutions to any Pell equation for which there is one non-trivial one, which is true 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: Hence, the first square triangular number, derived from (3,1) , is 1 , and the next, derived from 6\cdot (3,1)-(1,0)=(17,6) , is 36 . The sequences N_k , s_k and t_k are the OEIS sequences , , and respectively. ==Explicit formula== In 1778 Leonhard Euler determined the explicit formula {{bi|left=1.6| \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 The corresponding explicit formulas for s_k and t_k are: {{bi|left=1.6| \displaystyle \begin{align} 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{align} }} ==Recurrence relations== The solution to the Pell equation can be expressed as a recurrence relation for the equation's solutions. This can be translated into recurrence equations that directly express the square triangular numbers, as well as the sides of the square and triangle involved. We have {{bi|left=1.6| \displaystyle \begin{align} 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{align} }} We have ==Other characterizations== All square triangular numbers have the form b^2c^2 , where \tfrac{b}{c} is a convergent to the continued fraction expansion of \sqrt2 , the square root of 2. A. V. Sylwester gave a short proof that there are infinitely many square triangular numbers: If the n th triangular number \tfrac{n(n+1)}{2} is square, then so is the larger 4n(n+1) th triangular number, since: The left hand side of this equation is in the form of a triangular number, and as the product of three squares, the right hand side is square. The generating function for the square triangular numbers is: \frac{1+z}{(1-z)\left(z^2 - 34z + 1\right)} = 1 + 36z + 1225 z^2 + \cdots ==See also== Cannonball problem, on numbers that are simultaneously square and square pyramidal Sixth power, numbers that are simultaneously square and cubical ==Notes== ==External links== Triangular numbers that are also square at cut-the-knot Michael Dummett's solution

References

  1. Square Triangular Number · retrieved 2026-11-17 · rev 1355039347
    Cite this reference

    MLA "Square Triangular Number." Weisstein, Eric W. 2026-11-17. https://en.wikipedia.org/wiki/Eric_W._Weisstein. Accessed 25 November 2026.

    Chicago "Square Triangular Number." Weisstein, Eric W. 2026-11-17. https://en.wikipedia.org/wiki/Eric_W._Weisstein.

    APA Weisstein, Eric W. (2026). Square Triangular Number. Retrieved November 25, 2026, from https://en.wikipedia.org/wiki/Eric_W._Weisstein

  2. 1031 Generating Functions · retrieved 2009-05-10 · rev 1355039347
    Cite this reference

    MLA "1031 Generating Functions." Plouffe, Simon (August 1992). 2009-05-10. https://en.wikipedia.org/wiki/Simon_Plouffe. Accessed 25 November 2026.

    Chicago "1031 Generating Functions." Plouffe, Simon (August 1992). 2009-05-10. https://en.wikipedia.org/wiki/Simon_Plouffe.

    APA Plouffe, Simon (August 1992). (2009). 1031 Generating Functions. Retrieved November 25, 2026, from https://en.wikipedia.org/wiki/Simon_Plouffe

  3. Ball, W. W. Rouse ; Coxeter, H. S. M. (1987). Mathematical Recreations and Essays . New York: Dover Publications. p. 59 . ISBN 978-0-486-25357-2 . Wikipedia revision 1355039347, retrieved 2026-11-18 · retrieved 2026-11-17 · rev 1355039347
    Cite this reference

    MLA "Ball, W. W. Rouse ; Coxeter, H. S. M. (1987). Mathematical Recreations and Essays . New York: Dover Publications. p. 59 . ISBN 978-0-486-25357-2 . Wikipedia revision 1355039347, retrieved 2026-11-18." Ball, W. 2026-11-17. https://en.wikipedia.org/wiki/W._W._Rouse_Ball. Accessed 25 November 2026.

    Chicago "Ball, W. W. Rouse ; Coxeter, H. S. M. (1987). Mathematical Recreations and Essays . New York: Dover Publications. p. 59 . ISBN 978-0-486-25357-2 . Wikipedia revision 1355039347, retrieved 2026-11-18." Ball, W. 2026-11-17. https://en.wikipedia.org/wiki/W._W._Rouse_Ball.

    APA Ball, W. (2026). Ball, W. W. Rouse ; Coxeter, H. S. M. (1987). Mathematical Recreations and Essays . New York: Dover Publications. p. 59 . ISBN 978-0-486-25357-2 . Wikipedia revision 1355039347, retrieved 2026-11-18. Retrieved November 25, 2026, from https://en.wikipedia.org/wiki/W._W._Rouse_Ball

  4. a b Dickson, Leonard Eugene (1999) [1920]. History of the Theory of Numbers . Vol. 2. Providence: American Mathematical Society. p. 16. ISBN 978-0-8218-1935-7 . Wikipedia revision 1355039347, retrieved 2026-11-18 · retrieved 2026-11-17 · rev 1355039347
    Cite this reference

    MLA "a b Dickson, Leonard Eugene (1999) [1920]. History of the Theory of Numbers . Vol. 2. Providence: American Mathematical Society. p. 16. ISBN 978-0-8218-1935-7 . Wikipedia revision 1355039347, retrieved 2026-11-18." a b Dickson, Leonard Eugene (1999) [1920]. 2026-11-17. https://en.wikipedia.org/wiki/Leonard_Eugene_Dickson. Accessed 25 November 2026.

    Chicago "a b Dickson, Leonard Eugene (1999) [1920]. History of the Theory of Numbers . Vol. 2. Providence: American Mathematical Society. p. 16. ISBN 978-0-8218-1935-7 . Wikipedia revision 1355039347, retrieved 2026-11-18." a b Dickson, Leonard Eugene (1999) [1920]. 2026-11-17. https://en.wikipedia.org/wiki/Leonard_Eugene_Dickson.

    APA a b Dickson, Leonard Eugene (1999) [1920]. (2026). a b Dickson, Leonard Eugene (1999) [1920]. History of the Theory of Numbers . Vol. 2. Providence: American Mathematical Society. p. 16. ISBN 978-0-8218-1935-7 . Wikipedia revision 1355039347, retrieved 2026-11-18. Retrieved November 25, 2026, from https://en.wikipedia.org/wiki/Leonard_Eugene_Dickson

  5. a b c Euler, Leonhard (1813). "Regula facilis problemata Diophantea per numeros integros expedite resolvendi (An easy rule for Diophantine problems which are to be resolved quickly by integral numbers)" . Mémoires de l'Académie des Sciences de St.-Pétersbourg (in Latin). 4 : 3– 17 . Retrieved 2009-05-11 . According to the records, it was presented to the St. Petersburg Academy on May 4, 1778. Wikipedia revision 1355039347, retrieved 2026-11-18 · retrieved 2009-05-10 · rev 1355039347
    Cite this reference

    MLA "a b c Euler, Leonhard (1813). "Regula facilis problemata Diophantea per numeros integros expedite resolvendi (An easy rule for Diophantine problems which are to be resolved quickly by integral numbers)" . Mémoires de l'Académie des Sciences de St.-Pétersbourg (in Latin). 4 : 3– 17 . Retrieved 2009-05-11 . According to the records, it was presented to the St. Petersburg Academy on May 4, 1778. Wikipedia revision 1355039347, retrieved 2026-11-18." a b c Euler, Leonhard (1813). 2009-05-10. https://en.wikipedia.org/wiki/Leonhard_Euler. Accessed 25 November 2026.

    Chicago "a b c Euler, Leonhard (1813). "Regula facilis problemata Diophantea per numeros integros expedite resolvendi (An easy rule for Diophantine problems which are to be resolved quickly by integral numbers)" . Mémoires de l'Académie des Sciences de St.-Pétersbourg (in Latin). 4 : 3– 17 . Retrieved 2009-05-11 . According to the records, it was presented to the St. Petersburg Academy on May 4, 1778. Wikipedia revision 1355039347, retrieved 2026-11-18." a b c Euler, Leonhard (1813). 2009-05-10. https://en.wikipedia.org/wiki/Leonhard_Euler.

    APA a b c Euler, Leonhard (1813). (2009). a b c Euler, Leonhard (1813). "Regula facilis problemata Diophantea per numeros integros expedite resolvendi (An easy rule for Diophantine problems which are to be resolved quickly by integral numbers)" . Mémoires de l'Académie des Sciences de St.-Pétersbourg (in Latin). 4 : 3– 17 . Retrieved 2009-05-11 . According to the records, it was presented to the St. Petersburg Academy on May 4, 1778. Wikipedia revision 1355039347, retrieved 2026-11-18. Retrieved November 25, 2026, from https://en.wikipedia.org/wiki/Leonhard_Euler

  6. Elementary Problems and Solutions: E 1473, Square Triangular Numbers · retrieved 2026-11-17 · rev 1355039347
    Cite this reference

    MLA "Elementary Problems and Solutions: E 1473, Square Triangular Numbers." Pietenpol, J. 2026-11-17. https://en.wikipedia.org/wiki/Doi_(identifier). Accessed 25 November 2026.

    Chicago "Elementary Problems and Solutions: E 1473, Square Triangular Numbers." Pietenpol, J. 2026-11-17. https://en.wikipedia.org/wiki/Doi_(identifier).

    APA Pietenpol, J. (2026). Elementary Problems and Solutions: E 1473, Square Triangular Numbers. Retrieved November 25, 2026, from https://en.wikipedia.org/wiki/Doi_(identifier)

Cite this article

MLA

"Square triangular number." encyclopegia.org, 2026, https://encyclopegia.org/wiki/square-triangular-number. Accessed 25 November 2026.

Chicago

"Square triangular number." encyclopegia.org. Accessed November 25, 2026. https://encyclopegia.org/wiki/square-triangular-number.

APA

encyclopegia.org. (2026). Square triangular number. Retrieved November 25, 2026, from https://encyclopegia.org/wiki/square-triangular-number

Accessed November 25, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Tahrir Square

stub · references available

natural number

stub · references available

fast inverse square root

stub · references available

International Standard Book Number

stub · references available

No Face, No Name, No Number

stub · references available

Fen Square-spot

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1355039347 · 0.5 · snapshot enwiki-001355039347

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.