Pick a mode with the four tabs across the top of the card: List first N, List a – b, Test a number or Lookup by index; the ? beside each tab describes it. Learn more about the modes
In List first N, type how many terms to show in Show first and click Update; the cards give the count, the largest term and the sum, and the tiles list every term. Learn more about listing terms
In List a – b, type the From index and the To index and click List range; a red box explains a bad range. Learn more about ranges
In Test a number, type a positive integer in Test number and click Check; a green box names the index, a red box says it is not a pentagonal number. Learn more about the test
The panel on the right explains the current mode and walks through the arithmetic with your own numbers; it changes with every tab and click. Learn more about the panel
The explorer opens on the List first N tab, one of four tabs across the top of the card; the small ? beside each tab shows what the mode does. Type how many terms you want in the Show first box and click Update or press Enter. Three cards answer at once: Showing gives the count, Largest the last term with its index, and Sum the total of the listed terms, which for pentagonal numbers is N2(N+1)/2. Under the cards every term is laid out as a tile with its index above its value, so P1=1 to PN can be read in order.
The box accepts 1 to 200: 10 gives P10=145 with the sum 550, 30 gives P30=1,335 with the sum 13,950, and 300 is capped at 200 terms, ending at P200=59,900 with the sum 4,020,000; a single term gives P1=1. Large values are printed with thousands separators. A count of 0, a decimal or an empty box is refused with "Enter a positive integer." There is no Reset button: type a new count and click Update again. The panel on the right, List first N, states the rule the tiles come from, and its walkthrough repeats the last term and the sum with your own N. What the terms are is explained in what is a pentagonal number.
Listing a Range of Indexes
DemoThe range tab, a new range, two bad ranges
Step 0 of 4
Click the List a – b tab to list the terms between two positions instead of starting from 1. Type the From index and the To index and click List range or press Enter. The cards give the Countb−a+1, the Smallest term Pa and the Largest term Pb, and the tiles below list every term in between with its index. The tab opens with 5 to 15, 11 terms from P5=35 to P15=330; indexes 10 to 20 give 11 terms from 145 to 590.
Both boxes must hold positive integers, the first no larger than the second, and the range may hold at most 200 terms; otherwise a red box explains: "Enter two positive integer indexes", "From-index must be less than or equal to to-index", or "Range too wide — cap is 200 terms". The panel on the right, List a – b, explains the mode, and its walkthrough names the smallest and largest term of your range. The rule each tile uses is explained in the closed form derivation.
Testing a Number
DemoThe test tab, a non-member, a member, 0
Step 0 of 4
Click the Test a number tab to ask whether a given positive integer is a pentagonal number. Type it in the Test number box and click Check or press Enter. A green box with a tick answers yes and names the index, as for the opening value 117, which is P9; a red box with a cross answers no, as for 100, and the walkthrough on the right then shows the two nearest pentagonal numbers, P8=92 and P9=117. A large value is handled the same way: 10,045 is P82.
The box takes positive integers only; 0, a negative number or a decimal is refused with "Enter a positive integer". The test behind the answer is exact: the explorer checks whether 24m+1 is a perfect square whose root is 5 more than a multiple of 6; if it is, the index is (24m+1+1)/6, otherwise the two nearest pentagonal numbers are shown, so no list has to be searched. The panel on the right, Test a number, states this rule, and its walkthrough carries out the arithmetic for your number. The rule itself is explained in the membership test.
Looking Up a Term by Index
DemoThe lookup tab, two indexes, n = 0
Step 0 of 4
Click the Lookup by index tab to compute one term directly. Type the position in the Index n box and click Get term or press Enter. Two cards answer: Index repeats n and Value gives Pn with its index as a subscript. The tab opens with n=25, which gives P25=925; n=100 gives 14,950 and n=1000 gives 1,499,500. The box takes positive integers only; 0 is refused with "Enter a positive integer index".
The panel on the right has two parts in every mode. How it works names the rule the mode uses, here Pn=n(3n−1)/2, and links to the section of this page that explains it; Walkthrough applies the rule to the numbers you typed, so for the lookup it shows the arithmetic with your n filled in. Both change as soon as you switch tabs or click a button. The rule and where it comes from are in the closed form derivation.
What is a Pentagonal Number?
A pentagonal number counts dots in a nested-pentagon pattern. Starting with a single dot, each next pentagon shares two sides with the previous one and adds a new layer of dots:
P1=1,P2=5,P3=12,P4=22,P5=35,P6=51,…
The closed form is
Pn=2n(3n−1)
Pentagonal numbers are the third in the family of polygonal numbers (after triangular and square). The general r-gonal-number formula
Pn(r)=2n[(r−2)n−(r−4)]
specializes to the pentagonal case at r=5.
Sum-of-arithmetic-series form.Pn=1+4+7+10+⋯+(3n−2), the sum of the first n terms of the arithmetic series with a1=1 and common difference d=3. The first term 1 and the step 3 reflect the geometry: the first pentagon has 1 dot, and each new layer adds 3 dots times n minus an adjustment for the shared vertex.
For deeper coverage see pentagonal number, polygonal numbers, and Euler's pentagonal number theorem.
From the arithmetic-series perspective. Pentagonal numbers are sums of the arithmetic series 1,4,7,10,…, where each term is 3k−2 for k=1,2,…,n. The sum is
Pn=k=1∑n(3k−2)=3k=1∑nk−2n=3⋅2n(n+1)−2n
Simplifying:
Pn=23n2+3n−4n=23n2−n=2n(3n−1)
From the general r-gonal formula. Substituting r=5 into
Pn(r)=2n[(r−2)n−(r−4)]
gives Pn(5)=n(3n−1)/2.
Why the formula is always an integer. Among any two consecutive integers, one is even. Either n is even, or 3n−1 is even (since 3n has the same parity as n). So n(3n−1) is always even.
The Membership Test
Given a positive integer m, testing whether it is pentagonal requires two checks.
The test.m is pentagonal if and only if both:
1. 24m+1 is a perfect square, and 2. 1+24m+1 is divisible by 6.
If both hold, the index is
n=61+24m+1
Why both checks are needed. From Pn=n(3n−1)/2=m, the quadratic 3n2−n−2m=0 has discriminant 1+24m, which must be a perfect square. But the quadratic formula gives n=(1±24m+1)/6, and we need n to be a positive integer, hence the divisibility condition.
Example. Is 117 pentagonal? Compute 24⋅117+1=2809=532 — a perfect square. Then (1+53)/6=9, an integer. So 117=P9. Verify: 9⋅26/2=117. Confirmed.
Non-example. Is 50 pentagonal? Compute 24⋅50+1=1201. Then 1201≈34.66 — not a perfect square. So 50 is not pentagonal. The nearest are P5=35 and P6=51.
Edge case where check 1 passes but check 2 fails. If 24m+1 happens to be a perfect square but the resulting 1+s is not divisible by 6, the candidate index would be fractional. The divisibility check rejects these.
Properties and Identities
• Recurrence: Pn=Pn−1+(3n−2) with P1=1. Each pentagonal number adds the next arithmetic-series term. • Generating function: ∑n=0∞Pnxn=(1−x)3x(1+x). The pentagonal numbers' generating function is a rational function. • Connection to triangulars: Pn=T3n−1−Tn−1, where Tk is the k-th triangular number. A pentagonal number is a difference of two triangulars. • Connection to hexagonal numbers: every hexagonal number Hn relates to a pentagonal number, though the correspondence is not as clean as Hn=T2n−1 for triangulars. • Asymptotic growth: Pn∼23n2 as n→∞. Pentagonal numbers grow as the square of the index. • Last-digit pattern: pentagonal numbers in base 10 end only in 0, 1, 2, 5, 6, or 7. Numbers ending in 3, 4, 8, or 9 cannot be pentagonal.
Euler's Pentagonal Number Theorem
Pentagonal numbers' most famous mathematical role is in Euler's pentagonal number theorem, a foundational result in the theory of integer partitions.
The theorem. For all formal power series:
n=1∏∞(1−xn)=k=−∞∑∞(−1)kxk(3k−1)/2
The exponents on the right are exactly the generalized pentagonal numbers0,1,2,5,7,12,15,22,26,…, obtained by letting k range over all integers (positive, zero, negative) in the formula k(3k−1)/2.
The combinatorial meaning. The left side is the generating function for the difference between the number of partitions of n into an even number of distinct parts and the number into an odd number of distinct parts. Euler's theorem says this difference is 0 except when n is a generalized pentagonal number, in which case it is ±1.
Why it matters. The reciprocal 1/∏(1−xn) is the generating function for the partition functionp(n). Euler's theorem gives a recurrence:
The signs follow a ++−−++−− pattern, and the subtractions stop when the argument goes negative. This is the fastest classical recurrence for the partition function — computing p(100) requires only about 15 terms.
Common Applications
• Integer partitions. As shown above, pentagonal numbers control the partition function via Euler's recurrence. Any algorithm computing p(n) efficiently goes through pentagonal numbers. • Modular forms. The product ∏(1−xn)=η(τ)/x1/24 (up to a factor) is the Dedekind eta function, a basic modular form. Pentagonal numbers appear in its q-expansion. • Combinatorial identities. Many partition identities, including Jacobi's triple product, build on Euler's pentagonal-number theorem. • Geometric counting. Pentagonal numbers count dots in nested-pentagon patterns; the dual of triangular and square configurations. • Lattice problems. Some 2D lattice-counting problems on pentagonal regions or 5-fold-symmetric structures involve pentagonal-number boundaries. • Recreational mathematics. Pentagonal numbers appear in puzzles, sequences, and figurate-number problems where one extends the polygon-counting paradigm beyond triangles and squares.
The counting ideas behind these uses start from properties.
Common Mistakes
• Confusing pentagonal with pentagon-related counts. Pentagonal numbers count dots in a specific nested-pentagon pattern, not all pentagonal arrangements. The number of dots in a regular pentagon's lattice differs depending on the construction.
• Forgetting the divisibility check.24m+1 being a perfect square is necessary but not sufficient. The divisibility-by-6 condition on 1+24m+1 filters out spurious candidates. Example: if 24m+1=49=72, then 1+7=8, not divisible by 6 — so m=2 is not pentagonal even though the perfect-square check passes.
• Confusing with generalized pentagonal numbers. The "classical" pentagonal numbers use n≥1 giving 1, 5, 12, 22, ... The generalized version allows all integer n giving 0, 1, 2, 5, 7, 12, 15, ... — different sequences with different roles.
• Misapplying the closed form.Pn=n(3n−1)/2 is exact for positive integer n. Extending to fractional or negative n requires the generalized formulation.
• Confusing Pn with the partition function p(n). Both use the letter p, but p(n) counts integer partitions while Pn is the n-th pentagonal number. The two are connected via Euler's theorem but distinct.
Triangular Numbers — Tn=n(n+1)/2. The first figurate family; pentagonal numbers extend the pattern to 5 sides.
Square Numbers — Sn=n2. The second figurate family; sits between triangular and pentagonal.
Hexagonal Numbers — Hn=n(2n−1). The next polygonal sequence after pentagonal.
Generalized Pentagonal Numbers — 0, 1, 2, 5, 7, 12, 15, 22, ... — pentagonal-number formula extended to all integer indexes. Appears in Euler's theorem.
Integer Partition — the number of ways to write n as a sum of positive integers, disregarding order. Pentagonal numbers determine the recurrence for the partition function.
Partition Function p(n) — counts partitions of n. Euler gave a pentagonal-number recurrence; Hardy and Ramanujan gave an asymptotic; Rademacher gave an exact formula.
Dedekind Eta Function — a modular form whose q-expansion features pentagonal-number exponents. Foundational in the theory of modular forms.
Polygonal Numbers — the family of r-gonal numbers for r=3,4,5,6,…. Pentagonal is the r=5 case.
Euler's Pentagonal Number Theorem — the identity ∏(1−xn)=∑(−1)kxk(3k−1)/2, summed over all integers k. One of the most beautiful results in the theory of partitions.
Figurate Numbers — the umbrella term covering all polygonal, pyramidal, and higher-dimensional analogs. Pentagonal is one entry in a vast taxonomy.
Generating Function — the formal power-series tool that connects pentagonal numbers to partitions, modular forms, and combinatorial identities.