Square Pyramidal Number Calculator

Find any square pyramidal number Pₙ.

How to use

  1. Enter your values in the fields above.
  2. Press Calculate to see your result instantly.
  3. Use the Share button to copy a link to your result.

About this calculator

The nth square pyramidal number Pₙ = n(n+1)(2n+1)/6 is the sum of the first n perfect squares (1² + 2² + … + n²), representing the number of spheres that stack into a pyramid with a square base n layers tall — one layer of n² balls, the next of (n−1)², and so on down to a single ball on top.

These numbers are famous in number theory for the cannonball problem: the question of when a square pyramidal stack can be rearranged into a flat square array, which turns out to happen only for n=1 and n=24 (1+4+9+…+24² = 4900 = 70²), a result proved using elliptic curves. Mathematics educators use square pyramidal numbers to teach summation formulas, and puzzle enthusiasts encounter them in classic stacking problems. Enter n to get Pₙ.

Was this helpful?

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators