# Pyramidal number

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Pyramidal_number
> Markdown URL: https://mediated.wiki/source/Pyramidal_number.md
> Source: https://en.wikipedia.org/wiki/Pyramidal_number
> Source revision: 1331437067
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{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](/source/pyramid_(geometry)) with a [polygon](/source/polygon)al base and triangular sides.<ref name=":0" /> The term often refers to [square pyramidal number](/source/square_pyramidal_number)s, which have a [square](/source/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 number](/source/polygonal_number)s of the given number of sides, while the numbers of points in each triangular side is given by a [triangular number](/source/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](/source/triangular_number).

==Sequences==
The first few triangular pyramidal numbers (equivalently, [tetrahedral number](/source/tetrahedral_number)s) are:

:[1](/source/1), [4](/source/4), [10](/source/10), [20](/source/20_(number)), [35](/source/35_(number)), [56](/source/56_(number)), [84](/source/84_(number)), [120](/source/120_(number)), [165](/source/165_(number)), [220](/source/220_(number)), ... {{OEIS|id=A000292}}

The first few [square pyramidal number](/source/square_pyramidal_number)s are:
:[1](/source/1_(number)), [5](/source/5_(number)), [14](/source/14_(number)), [30](/source/30_(number)), [55](/source/55_(number)), [91](/source/91_(number)), [140](/source/140_(number)), [204](/source/204_(number)), [285](/source/280_(number)), [385](/source/300_(number)), 506, 650, 819, ... {{OEIS|id=A000330}}.

The first few pentagonal pyramidal numbers are:

:[1](/source/1_(number)), [6](/source/6_(number)), [18](/source/18_(number)), [40](/source/40_(number)), [75](/source/75_(number)), [126](/source/126_(number)), [196](/source/196_(number)), [288](/source/288_(number)), 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](/source/1_(number)), [8](/source/8_(number)), [26](/source/26_(number)), [60](/source/60_(number)), [115](/source/115_(number)), 196, 308, 456, 645, 880, 1166, 1508, 1911, ...  {{OEIS|id=A002413}}

== References ==
{{reflist}}

{{Figurate numbers}}
Category:Figurate numbers

---
Adapted from the Wikipedia article [Pyramidal number](https://en.wikipedia.org/wiki/Pyramidal_number) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Pyramidal_number?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
