{{Short description|Figurate number}} thumb|upright=1.35|Geometric representation of the square pyramidal number {{nowrap|1=1 + 4 + 9 + 16 = 30.}}A '''pyramidal number''' is the number of points in a pyramid with a polygonal base and triangular sides.<ref name=":0" /> The term often refers to square pyramidal numbers, which have a square base with four sides, but it can also refer to a pyramid with any number of sides.<ref>{{Cite OEIS|1=A002414}}</ref> The numbers of points in the base and in layers parallel to the base are given by polygonal numbers of the given number of sides, while the numbers of points in each triangular side is given by a triangular number. It is possible to extend the pyramidal numbers to higher dimensions.
== Formula ==
The formula for the {{mvar|n}}th {{mvar|r}}-gonal pyramidal number is
:<math>P_n^r= \frac{3n^2 + n^3(r-2) - n(r-5)}{6},</math> where <math>r \isin \mathbb{N}</math>, {{math|''r'' ≥ 3}}.<ref name=":0">{{MathWorld |id=PyramidalNumber |title=Pyramidal Number}}</ref>
This formula can be factored:
:<math>P_n^r=\frac{n(n+1)\bigl(n(r-2)-(r-5)\bigr)}{(2)(3)}=\left(\frac{n(n+1)}{2}\right)\left(\frac{n(r-2)-(r-5)}{3}\right)=T_n \cdot \frac{n(r-2)-(r-5)}{3},</math>
where {{mvar|T<sub>n</sub>}} is the {{mvar|n}}th triangular number.
==Sequences== The first few triangular pyramidal numbers (equivalently, tetrahedral numbers) are:
:1, 4, 10, 20, 35, 56, 84, 120, 165, 220, ... {{OEIS|id=A000292}}
The first few square pyramidal numbers are: :1, 5, 14, 30, 55, 91, 140, 204, 285, 385, 506, 650, 819, ... {{OEIS|id=A000330}}.
The first few pentagonal pyramidal numbers are:
:1, 6, 18, 40, 75, 126, 196, 288, 405, 550, 726, 936, 1183, ... {{OEIS|id=A002411}}.
The first few hexagonal pyramidal numbers are: :{{num|1}}, {{num|7}}, {{num|22}}, {{num|50}}, {{num|95}}, {{num|161}}, {{num|252}}, 372, 525, 715, 946, 1222, 1547, 1925 {{OEIS|A002412}}.
The first few heptagonal pyramidal numbers are:<ref name="b">{{citation|title=Recreations in the Theory of Numbers: The Queen of Mathematics Entertains|first=Albert H.|last=Beiler|publisher=Courier Dover Publications|year=1966|isbn=9780486210964|page=194|url=https://books.google.com/books?id=fJTifbYNOzUC&pg=PA194}}.</ref> :1, 8, 26, 60, 115, 196, 308, 456, 645, 880, 1166, 1508, 1911, ... {{OEIS|id=A002413}}
== References == {{reflist}}
{{Figurate numbers}} Category:Figurate numbers