
In mathematics, apyramid number, orsquare pyramidal number, is anatural number that counts the stacked spheres in apyramid with a square base. The study of these numbers goes back toArchimedes andFibonacci. They are part of a broader topic offigurate numbers representing the numbers of points forming regular patterns within different shapes.
As well as counting spheres in a pyramid, these numbers can be described algebraically as a sum of the first positivesquare numbers, or as the values of acubic polynomial. They can be used to solve several other counting problems, including counting squares in a square grid and countingacute triangles formed from the vertices of an oddregular polygon. They equal the sums of consecutivetetrahedral numbers, and are one-fourth of a larger tetrahedral number. The sum of two consecutive square pyramidal numbers is anoctahedral number.
The pyramidal numbers were one of the few types of three-dimensional figurate numbers studied inGreek mathematics, in works byNicomachus,Theon of Smyrna, andIamblichus.[1] Formulas for summing consecutive squares to give a cubic polynomial, whose values are the square pyramidal numbers, are given byArchimedes, who used this sum as alemma as part of a study of the volume of acone,[2] and byFibonacci, as part of a more general solution to the problem of finding formulas for sums of progressions of squares.[3] The square pyramidal numbers were also one of the families of figurate numbers studied byJapanese mathematicians of the wasan period, who named them "kirei saijō suida" (with modernkanji, 奇零 再乗 蓑深).[4]
The same problem, formulated as one of counting thecannonballs in a square pyramid, was posed byWalter Raleigh to mathematicianThomas Harriot in the late 1500s, while both were on a sea voyage. Thecannonball problem, asking whether there are any square pyramidal numbers that are also square numbers other than 1 and 4900, is said to have developed out of this exchange.Édouard Lucas found the 4900-ball pyramid with a square number of balls, and in making the cannonball problem more widely known, suggested that it was the only nontrivial solution.[5] After incomplete proofs by Lucas and Claude-Séraphin Moret-Blanc, the first complete proof that no other such numbers exist was given byG. N. Watson in 1918.[6]

If spheres are packed into square pyramids whose number of layers is 1, 2, 3, etc., then the square pyramidal numbers giving the numbers of spheres in each pyramid are:[7][8]
These numbers can be calculated algebraically, as follows. If a pyramid of spheres is decomposed into its square layers with a square number of spheres in each, then the total number of spheres can be counted as the sum of the number of spheres in each square,and thissummation can be solved to give acubic polynomial, which can be written in several equivalent ways:This equation for a sum of squares is a special case ofFaulhaber's formula for sums of powers, and may be proved bymathematical induction.[9]
More generally,figurate numbers count the numbers of geometric points arranged in regular patterns within certain shapes. The centers of the spheres in a pyramid of spheres form one of these patterns, but for many other types of figurate numbers it does not make sense to think of the points as being centers of spheres.[8]In modern mathematics, related problems of counting points ininteger polyhedra are formalized by theEhrhart polynomials. These differ from figurate numbers in that, for Ehrhart polynomials, the points are always arranged in aninteger lattice rather than having an arrangement that is more carefully fitted to the shape in question, and the shape they fit into is a polyhedron with lattice points as its vertices. Specifically, the Ehrhart polynomialL(P,t) of an integer polyhedronP is apolynomial that counts the integer points in a copy ofP that is expanded by multiplying all its coordinates by the numbert. The usual symmetric form of a square pyramid, with aunit square as its base, is not an integer polyhedron, because the topmost point of the pyramid, its apex, is not an integer point. Instead, the Ehrhart polynomial can be applied to an asymmetric square pyramidP with a unit square base and an apex that can be any integer point one unit above the base plane. For this choice ofP, the Ehrhart polynomial of a pyramid is(t + 1)(t + 2)(2t + 3)/6 =Pt + 1.[10]

As well as counting spheres in a pyramid, these numbers can be used to solve several other counting problems. For example, a commonmathematical puzzle involves counting the squares in a largen byn square grid.[11] This count can be derived as follows:
It follows that the number of squares in ann ×n square grid is:[12]That is, the solution to the puzzle is given by then-th square pyramidal number.[7] The number of rectangles in a square grid is given by thesquared triangular numbers.[13]
The square pyramidal number also counts theacute triangles formed from the vertices of a-sidedregular polygon. For instance, an equilateral triangle contains only one acute triangle (itself), a regularpentagon has five acutegolden triangles within it, a regularheptagon has 14 acute triangles of two shapes, etc.[7] More abstractly, when permutations of the rows or columns of amatrix are considered as equivalent, the number of matrices with non-negative integer coefficients summing to, for odd values of, is a square pyramidal number.[14]


Thecannonball problem asks for the sizes of pyramids of cannonballs that can also be spread out to form a square array, or equivalently, 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.[6]
The square pyramidal numbers can be expressed as sums ofbinomial coefficients:[15][16]
The binomial coefficients occurring in this representation aretetrahedral numbers, and this formula expresses a square pyramidal number as the sum of two tetrahedral numbers in the same way as square numbers split into two consecutivetriangular numbers.[8][15]
If a tetrahedron is reflected across one of its faces, the two copies form atriangular bipyramid. The square pyramidal numbers are also the figurate numbers of the triangular bipyramids, and this formula can be interpreted as an equality between the square pyramidal numbers and the triangular bipyramidal numbers.[7] Analogously, reflecting a square pyramid across its base produces an octahedron, from which it follows that eachoctahedral number is the sum of two consecutive square pyramidal numbers.[17]
Square pyramidal numbers are also related to tetrahedral numbers in a different way: the points from four copies of the same square pyramid can be rearranged to form a single tetrahedron with twice as many points along each edge. That is,[18]
To see this, arrange each square pyramid so that each layer is directly above the previous layer, e.g. the heights are
4321332122211111
Four of these can then be joined by the height4 pillar to make an even square pyramid, with layers.
Each layer is the sum of consecutive triangular numbers, i.e., which, when totalled, sum to the tetrahedral number.
Thealternating series ofunit fractions with the square pyramidal numbers as denominators is closely related to theLeibniz formula forπ, although it converges faster. It is:[19]
Inapproximation theory, the sequences of odd numbers, sums of odd numbers (square numbers), sums of square numbers (square pyramidal numbers), etc., form the coefficients in a method for convertingChebyshev approximations intopolynomials.[20]
{{citation}}: CS1 maint: ignored ISBN errors (link){{citation}}: CS1 maint: location missing publisher (link)