Skip to content
Number Buffet

Pentagonal numbers

1, 5, 12, 22, 35 — the figurate numbers whose generalised form controls how every integer can be partitioned.

OEIS A000326 · 2 min read

Settings

Quick presets

Terms are produced in order starting from the chosen index.

P(0) = 0; most lists begin at P(1) = 1.

Standard pentagonal, the generalised form with negative k, or the centred form.

The worked form suits teaching; plain numbers export more cleanly.

Group long terms as 1,413,721 for readability.

Fine-tune the look

Pick a preset next to the image first — these controls adjust it.

Frame

A border drawn inside the edge of the image.

Advanced

Results

20 values

1, 5, 12, 22, 35, 51, 70, 92, 117, 145, 176, 210, 247, 287, 330, 376, 425, 477, 532, 590

Pentagonal numbers count the dots in a pentagon built outward from one corner.


Make an image

Turn on JavaScript to style and download these numbers as an image. The values themselves are listed above.

Text on the image

Drag a line straight onto the picture to place it — once placed, it stays exactly where you put it. Everything here is drawn into the download.

About pentagonal numbers

Pentagonal numbers belong to the same Greek tradition as the triangular and square numbers — count the dots that pack into a pentagon, growing it outward from a single fixed corner rather than symmetrically — but they are the figurate family that turned out to matter most, and for a reason nobody studying pebble arrangements could have anticipated.

The route runs through Leonhard Euler and the theory of partitions. A partition of an integer is a way of writing it as a sum of positive integers without regard to order: 4 can be written as 4, 3+1, 2+2, 2+1+1, or 1+1+1+1, so p(4) = 5. The partition function grows quickly and has no simple closed form, and in the eighteenth century it looked intractable.

Euler found the key by studying an infinite product, and what fell out of it was startling. Expanding the product of (1 − x^k) over all positive k produces a series in which almost every coefficient is zero; the surviving terms are ±1, and they sit precisely at the generalised pentagonal numbers 0, 1, 2, 5, 7, 12, 15, 22, 26, with signs alternating in pairs. That statement is Euler's pentagonal number theorem, which he conjectured around 1740 and proved roughly a decade later.

The consequence is a recurrence that computes p(n) from earlier values using only additions and subtractions, with the terms indexed by pentagonal numbers. It remains a practical algorithm, and it is the reason a sequence that began as a way of arranging pebbles sits at the centre of additive number theory. Hardy and Ramanujan's asymptotic formula and Rademacher's exact series came much later, and neither displaced Euler's recurrence for exact computation at modest size.

Key properties

  • P(n) = n(3n−1)/2, giving 1, 5, 12, 22, 35, 51, 70, 92, 117, 145.
  • The generalised pentagonal numbers allow negative k, interleaving to give 0, 1, 2, 5, 7, 12, 15, 22, 26, 35.
  • P(n) is one third of the triangular number T(3n−1), linking the two families directly.
  • Euler’s pentagonal number theorem states that the product of (1 − x^k) expands to a series supported exactly on the generalised pentagonal numbers, with coefficients ±1.
  • That theorem yields a recurrence computing the partition function p(n) by additions and subtractions alone.
  • Every pentagonal number is the sum of three triangular numbers.
  • Only three pentagonal numbers are also triangular below a very large bound — 1, 210 and 40755 — and such coincidences are governed by a Pell equation.

Where they turn up

  • The partition function, where the generalised pentagonal numbers index the only surviving terms in Euler’s recurrence.
  • Statistical mechanics and the theory of modular forms, both of which inherit partition generating functions.
  • Integer-partition algorithms in computer algebra systems, which still implement Euler’s pentagonal recurrence for exact values.
  • Recreational puzzles about stacking and packing objects in pentagonal arrangements.

How to use this generator

The generated values appear at the top, with a copy button beside them. To turn them into an image, pick a look from the style presets under Make an image, choose an export size, and download as PNG, JPEG or WebP. Everything is rendered in your browser, so nothing you generate is sent to a server.

The address bar updates as you work, so the link always reproduces exactly what you see — handy for sharing a specific sequence or saving a configuration for later. Use Copy to take the values as plain text, or Export data for CSV, JSON, NDJSON, SQL or XML.

Sources

Historical summaries on this page draw on the openly licensed references listed above. Spotted an error? Tell us and we will fix it.