Enter the number of polygon sides s and the term index n to calculate a centered polygonal number. This calculator uses n = 1 for the single central dot. Each subsequent term adds another ring of dots.
Starting with one central dot, the successive rings contribute s, 2s, 3s and so on. Term n contains n − 1 rings, so their combined contribution is s × (1 + 2 + … + (n − 1)) = s × n × (n − 1) / 2. Adding the central dot gives the result.
For s = 6 and n = 4, the calculation is 1 + 6 × 4 × 3 / 2 = 37. This is the fourth centered hexagonal number.
| Polygon | Sides | n = 1 | n = 2 | n = 3 | n = 4 | n = 5 |
|---|---|---|---|---|---|---|
| Triangle | 3 | 1 | 4 | 10 | 19 | 31 |
| Square | 4 | 1 | 5 | 13 | 25 | 41 |
| Pentagon | 5 | 1 | 6 | 16 | 31 | 51 |
| Hexagon | 6 | 1 | 7 | 19 | 37 | 61 |
Use whole numbers only: 3–1,000,000 sides and a term index of 1–10,000. Fractional inputs do not represent terms of a centered polygonal sequence. These bounds keep the integer calculations within exact integer precision for standard double-precision arithmetic. An unavailable result is not zero; check that both inputs are within the stated limits.
What if my sequence starts at index zero?
If index k = 0 denotes the central dot, enter n = k + 1 here. In that convention the same formula is 1 + s × k × (k + 1) / 2.
Are centered polygonal numbers the same as ordinary polygonal numbers?
They describe different dot arrangements. Centered polygonal numbers grow in rings around a central dot. For example, centered square numbers begin 1, 5, 13, 25, while ordinary square numbers begin 1, 4, 9, 16.
Why is the result always an integer for valid inputs?
The consecutive integers n and n − 1 include an even number, so n × (n − 1) is divisible by 2. Multiplying by integer s and adding 1 preserves an integer result.

