Square Pyramidal Number Calculator

P(n) = n(n+1)(2n+1)/6

CalculatorsFreeNo Signup
4.6(355 reviews)
All Tools

Loading tool...

About Square Pyramidal Number Calculator

A square pyramidal number calculator computing P(n) = n(n+1)(2n+1)/6 = Σk² for k=1..n. These count balls in a pyramid with square layers. Shows the formula, individual squares, and connects to figurate numbers. Client-side.

Square Pyramidal Number Calculator Features

  • P(n) formula
  • Sum of squares
  • Cannonball problem
  • Sequence
  • Figurate numbers
Square pyramidal numbers: P(n) = 1²+2²+...+n² = n(n+1)(2n+1)/6. First: 1,5,14,30,55,91,140,204,285... Count cannonballs in a square pyramid. The cannonball problem: only P(24)=4900=70² is both a square pyramidal and a perfect square.

How to Use

Enter n:

  • P(n): The pyramidal number
  • Sum: 1²+2²+...+n²
  • Layers: Individual squares

The Cannonball Problem

When is a sum of consecutive squares also a perfect square? P(n) = m²? The only solution is n=24: P(24)=4900=70². Proved by G.N. Watson in 1918 using elliptic functions.

The Formula

P(n) = n(n+1)(2n+1)/6. Proof by induction or by the identity Σk² = n³/3 + n²/2 + n/6. This is a degree-3 polynomial in n, giving cubic growth.

Step-by-Step Instructions

  1. 1Enter n.
  2. 2Compute P(n).
  3. 3See individual squares.
  4. 4Check sequence.
  5. 5Compare to formula.

Square Pyramidal Number Calculator — Frequently Asked Questions

Why is P(24)=70² the only solution?+

P(n)=m² gives n(n+1)(2n+1)=6m². Watson proved in 1918 that the only positive solution is (n,m)=(24,70). The proof uses the theory of elliptic curves — the equation defines an elliptic curve with finitely many rational points.

What's the connection to Faulhaber's formulas?+

P(n) is the second Faulhaber formula (k=2). Faulhaber's formulas give Σi^k for any k: Σi=n(n+1)/2, Σi²=n(n+1)(2n+1)/6, Σi³=(n(n+1)/2)², etc. Each is a polynomial in n of degree k+1.

How many cannonballs in a real pyramid?+

A 10-layer pyramid: P(10)=385 cannonballs. 20 layers: P(20)=2870. 24 layers: P(24)=4900=70² — the only case where you can rearrange the pyramid into a perfect square. Historical military depots actually stacked cannonballs this way!

Share this tool: