### Formula

Pn

the n-th square pyramidal number

n

an integer

Pn

the n-th square pyramidal number

n

an integer

In mathematics, square pyramidal number, is a figurate number that represents the number of stacked spheres in a pyramid with a square base. Square pyramidal numbers also solve the problem of counting the number of squares in an n by n grid. The first few square pyramidal numbers are: 1, 5, 14, 30, 55, 91, 140, 204, 285, 385, 506, 650, 819.

n

Pn

Precision

- C
- C#
- C++
- Java
- JavaScript
- LaTeX
- PHP