Mathwords logoMathwords

Square Triangular Number — Definition, Formula & Example

A square triangular number is a whole number that is both a perfect square and a triangular number. That many dots can be arranged as a filled square or as a staircase-shaped triangle. The first few are 1, 36, 1225, and 41616.

A nonnegative integer NN is a square triangular number if N=m2=n(n+1)2N = m^2 = \frac{n(n+1)}{2} for some nonnegative integers mm and nn. Rearranging gives (2n+1)2−8m2=1(2n+1)^2 - 8m^2 = 1. So the pairs x=2n+1x = 2n+1, y=2my = 2m are solutions of Pell's equation x2−2y2=1x^2 - 2y^2 = 1. There are infinitely many such numbers. Starting from N0=0N_0 = 0 and N1=1N_1 = 1 (some sources omit 0), they satisfy the recurrence Nk+1=34Nk−Nk−1+2N_{k+1} = 34N_k - N_{k-1} + 2.

Key Formula

Nk=[(3+22)k−(3−22)k]232,k=0,1,2,…N_k = \frac{\left[(3+2\sqrt{2})^k - (3-2\sqrt{2})^k\right]^2}{32}, \quad k = 0, 1, 2, \dots
Where:
  • NkN_k = the k-th square triangular number (N_0 = 0, N_1 = 1, N_2 = 36, N_3 = 1225)
  • kk = the position in the sequence, a nonnegative integer

Worked Example

Problem: Show that 1225 is a square triangular number. Find mm and nn with 1225=m2=n(n+1)21225 = m^2 = \frac{n(n+1)}{2}.
Step 1: Check that 1225 is a perfect square.
352=122535^2 = 1225
Step 2: Use the triangular-number test. NN is triangular exactly when 8N+18N + 1 is a perfect square.
8(1225)+1=9801=9928(1225) + 1 = 9801 = 99^2
Step 3: Solve n2+n−2450=0n^2 + n - 2450 = 0 with the quadratic formula. Keep the positive root, then check it.
n=−1+992=49,49⋅502=1225n = \frac{-1 + 99}{2} = 49, \qquad \frac{49 \cdot 50}{2} = 1225
Answer: 1225 is a square triangular number because 1225=3521225 = 35^2 and 1225=49⋅5021225 = \frac{49 \cdot 50}{2}. So m=35m = 35 and n=49n = 49.

Why It Matters

Square triangular numbers are a standard first example of Pell's equation in number theory and in competitions such as the AMC and olympiads. For 1225, x=99x = 99 and y=70y = 70 satisfy 992−2(70)2=199^2 - 2(70)^2 = 1. The fraction 9970≈1.414286\frac{99}{70} \approx 1.414286 is a very close approximation of the irrational number 2\sqrt{2}.

Common Mistakes

Mistake: Assuming a perfect square such as 100 is triangular just because it is a familiar square.
Correction: Run the triangular test as well. For 100, 8(100)+1=8018(100) + 1 = 801, which lies between 282=78428^2 = 784 and 292=84129^2 = 841. So 100 is not triangular. Square triangular numbers are rare. The next one after 1225 is 41616.

Related Terms

  • Triangular Number — Every square triangular number is triangular
  • Square Number — Every square triangular number is a perfect square
  • Natural Numbers — Square triangular numbers form a subset of these
  • Integers — Pell's equation solutions are integer pairs
  • Even Number — Terms alternate odd and even: 1, 36, 1225
  • Number Theory — Branch of mathematics that studies such integer properties
  • Pell Equation — Square triangular numbers come from solutions of Pell's equation x² − 2y² = 1