Square Pyramidal Number Calculator
Compute the nth square pyramidal number n(n+1)(2n+1)/6, the running sum of squares, shown with a sequence table.
Input
Enter an index n to compute the nth square pyramidal number, the running sum of squares from 1 squared up to n squared.
Enter an integer of 1 or more.
Result
The 5th square pyramidal number
55
Matching square n squared
25
First term of the sequence
1
A square pyramidal number is a running sum of squares, given by P(n) = n(n+1)(2n+1)/6.
Sequence table
| Index k | Square k squared | Square pyramidal P(k) |
|---|---|---|
| 1 | 1 | 1 |
| 2 | 4 | 5 |
| 3 | 9 | 14 |
| 4 | 16 | 30 |
| 5 | 25 | 55 |
How it works
- A square pyramidal number counts spheres stacked in a pyramid with a square base: squares 1, 4, 9 and so on placed from top to bottom. The nth square pyramidal number P(n) equals the sum of the first n squares, P(n) = 1 squared plus 2 squared plus and so on up to n squared.
- In closed form this is P(n) = n(n+1)(2n+1)/6. For example, when n is 5, the sum 1 + 4 + 9 + 16 + 25 = 55 matches 5 times 6 times 11 divided by 6, which is 55.
- Enter a positive integer n and the tool shows the nth square pyramidal number as the main result, along with the matching square n squared, the first value of the sequence, and a table of each term.
- The sequence table lists up to the first 20 terms. When n is larger than that, the tool notes how many terms are shown and the value of n you entered.
Reviews
Tell us what you think of this calculator.
Write a review
- Home
Square Pyramidal Number Calculator