Square Triangular Number Calculator

m² = k(k+1)/2

CalculatorsFreeNo Signup
4.2(279 reviews)
All Tools

Loading tool...

About Square Triangular Number Calculator

A square triangular number calculator finding numbers that are simultaneously square (m²) and triangular (k(k+1)/2). Uses the Pell equation x²−2y²=1. Known sequence: 1,36,1225,41616... Shows both m and k values. Client-side.

Square Triangular Number Calculator Features

  • Generate sequence
  • Check number
  • m and k values
  • Pell connection
  • Table
Square triangular numbers: simultaneously m² and T(k)=k(k+1)/2. Sequence: 1, 36, 1225, 41616, 1413721... 36=6²=T(8), 1225=35²=T(49). Infinitely many exist, generated by Pell equation x²−2y²=1.

How to Use

Features:

  • Generate: First N square triangular numbers
  • Check: Is n both square and triangular?
  • Values: Both m and k

Formula

The nth square triangular number: ST(n) = ((17+12√2)ⁿ + (17-12√2)ⁿ - 2)/32. Recurrence: ST(n) = 34·ST(n-1) - ST(n-2) + 2.

Pell Equation

If x²−2y²=1 (Pell), then m=(x−1)/2 gives m²=T(k) where k=(x−1)/2·y. Fundamental solution: (3,2) → ST(1)=1. Next: (17,12) → ST(2)=36.

Step-by-Step Instructions

  1. 1Choose count.
  2. 2Generate sequence.
  3. 3View m,k values.
  4. 4Check a number.
  5. 5See Pell connection.

Square Triangular Number Calculator — Frequently Asked Questions

How many square triangular numbers exist?+

Infinitely many. The Pell equation x²−2y²=1 has infinitely many solutions, each giving a square triangular number. They grow exponentially: the ratio of consecutive terms approaches (3+2√2)² ≈ 33.97.

What is the connection to Pell equations?+

m²=k(k+1)/2 rearranges to (2k+1)²−2(2m)²=1. Setting x=2k+1, y=2m gives x²−2y²=1 (Pell). Each solution (x,y) yields k=(x-1)/2 and m=y/2, giving a square triangular number m².

Is there a direct formula?+

Yes: ST(n) = ⌊(1/(4√2))·(1+√2)^(2n)⌋² works for all n. Equivalently, the recurrence ST(n)=34·ST(n-1)−ST(n-2)+2 with ST(0)=0, ST(1)=1 generates the sequence.

Share this tool: