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
- Pentagonal number — Wikipedia — CC BY-SA 4.0
- Pentagonal number theorem — Wikipedia — CC BY-SA 4.0
- OEIS A000326 — Pentagonal numbers — CC BY-SA 4.0
- MacTutor — Leonhard Euler — CC BY-SA 4.0
Historical summaries on this page draw on the openly licensed references listed above. Spotted an error? Tell us and we will fix it.