Square pyramidal number


In mathematics, a pyramid number, or 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 grid.

Formula

The first few square pyramidal numbers are:
These numbers can be expressed in a formula as
This is a special case of Faulhaber's formula, and may be proved by a mathematical induction. An equivalent formula is given in Fibonacci's Liber Abaci.
In modern mathematics, figurate numbers are formalized by the Ehrhart polynomials. The Ehrhart polynomial of a polyhedron is a polynomial that counts the number of integer points in a copy of that is expanded by multiplying all its coordinates by the number. The Ehrhart polynomial of a pyramid whose base is a unit square with integer coordinates, and whose apex is an integer point at height one above the base plane, is.

Relations to other figurate numbers

The square pyramidal numbers can also be expressed as sums of binomial coefficients:
The binomial coefficients occurring in this representation are tetrahedral numbers, and this formula expresses a square pyramidal number as the sum of two tetrahedral numbers in the same way as square numbers are the sums of two consecutive triangular numbers.
The smaller tetrahedral number represents and the larger. Offsetting the larger and adding, we arrive at, the square numbers.
In this sum, one of the two tetrahedral numbers counts the number of balls in a stacked pyramid that are directly above or to one side of a diagonal of the base square, and the other tetrahedral number in the sum counts the number of balls that are to the other side of the diagonal. Square pyramidal numbers are also related to tetrahedral numbers in a different way:
The sum of two consecutive square pyramidal numbers is an octahedral number.
Augmenting a pyramid whose base edge has balls by adding to one of its triangular faces a tetrahedron whose base edge has balls produces a triangular prism. Equivalently, a pyramid can be expressed as the result of subtracting a tetrahedron from a prism. This geometric dissection leads to another relation:
The cannonball problem asks which numbers are both square and square pyramidal.
Besides 1, there is only one other number that has this property: 4900, which is both the 70th square number and the 24th square pyramidal number. This fact was proven by G. N. Watson in 1918.
Another relationship involves the Pascal Triangle: Whereas the classical Pascal Triangle with sides has diagonals with the natural numbers, triangular numbers, and tetrahedral numbers, generating the Fibonacci numbers as sums of samplings across diagonals, the sister Pascal with sides has equivalent diagonals with odd numbers, square numbers, and square pyramidal numbers, respectively, and generates the Lucas numbers rather than Fibonacci.
In the same way that the square pyramidal numbers can be defined as a sum of consecutive squares, the squared triangular numbers can be defined as a sum of consecutive cubes.
Also,
which is the difference of two pentatope numbers.
This can be seen by expanding:
and dividing through by 24.

Squares in a square

A common mathematical puzzle involves finding the number of squares in a large by square grid. This number can be derived as follows:
It follows that the number of squares in an square grid is:
That is, the solution to the puzzle is given by the square pyramidal numbers.
The number of rectangles in a square grid is given by the squared triangular numbers.

Derivation of the summation formula

The difference of two consecutive square numbers is always an odd number. More precisely, because of the identity, the difference between the th and the th square number is. This yields the following scheme:
Hence any square number can be written as a sum of odd numbers, that is:
This representation of square numbers can be used to express the sum of the first square numbers by odd numbers arranged in a triangle with the sum of all numbers in the triangle being equal to the sum of the first square numbers:
The same odd numbers are now arranged in two different ways in congruent triangles.
Stacking the three triangles on top of each other's yields you columns consisting of three numbers, which have the property that their sum is always. At each vertex the sum of the column is. Now if you move from one column to another then in one triangle the number will increase by two but in a second triangle it decrease by two and remain the same in the third triangle, hence the sum of the column stays constant. There are such columns, so the sum of the numbers in all three triangles is. This is 3 times the sum of the first square numbers, so it yields: