Centered Heptagonal Number Calculator
Count points in a heptagonal pattern grown from a centre with successive layers around it.
What it does
Centered heptagonal numbers count dots in a pattern that starts with one central point and adds heptagonal layers around it. The sequence begins 1, 8, 22, 43, 71 and 106. Each new layer adds seven times the layer number, so the count grows quadratically.
The closed form is seven times n times n minus one, divided by two, then plus one. The division is exact for every integer n because one of n and n minus one is even. The tool verifies that before returning a value.
These numbers belong to the centred polygonal family, which also includes the centred triangular, square, pentagonal, hexagonal and octagonal cases. What changes between families is the coefficient in front of the quadratic term.
This page evaluates the formula with exact integer arithmetic and shows the previous term and ratio beside the answer. It gives counts only, not a drawing of the layers.
The index limit is one hundred thousand, which keeps the printed value around eleven digits.
How to use
- Enter an index n from 1 to 100,000.
- Read the centered heptagonal number in the main result box.
- Check the previous term and growth beside it.
- The default index 5 reproduces the worked example.
- Try n = 4 to confirm the value 43.
- Remember that index 1 is the centre alone.
Formula
- n
- The index, starting at one for the centre.
- C(n)
- The number of points in the centred heptagonal pattern.
The kth layer adds seven k points, so the total is one plus seven times the sum from one to n minus one. That sum is n times n minus one over two. The value at n = 1 is one, the centre alone.
Worked example
Example: index 5
The page opens with n = 5.
- Compute n times n minus one: 5 x 4 = 20.
- Multiply by seven: 7 x 20 = 140.
- Divide by two: 140 / 2 = 70.
- Add one for the centre: 70 + 1 = 71.
- The tool reports 71, previous term 43, and growth 1.65x.
- Check the layer sum: 1 + 7 + 14 + 21 + 28 = 71.
Reference table
| n | C(n) | Previous | Growth |
|---|---|---|---|
| 1 | 1 | n/a | n/a |
| 2 | 8 | 1 | 8.00x |
| 3 | 22 | 8 | 2.75x |
| 4 | 43 | 22 | 1.95x |
| 5 | 71 | 43 | 1.65x |
| 6 | 106 | 71 | 1.49x |
Limits
- The index starts at one, so zero is rejected.
- Indices above 100,000 are rejected to keep the output readable.
- The growth column is rounded to two decimals.
- The tool gives counts, not drawings of the layers.
Common mistakes
- Starting the index at zero instead of one.
- Confusing centred and ordinary heptagonal numbers.
- Using seven n instead of seven times n minus one in the product.
- Forgetting to add the central point.
- Expecting cubic growth from a quadratic formula.
Try it yourself
Quick checks. Answers sit tucked under each question.
What is C(5)?
C(5) = 7 x 5 x 4 / 2 + 1 = 71.
What is C(4)?
C(4) = 7 x 4 x 3 / 2 + 1 = 43.
What is C(1)?
C(1) = 1, the central point.
Questions
What is the centred heptagonal family?
A pattern with one centre and layers whose sizes follow the heptagonal side count.
How many points does each layer add?
Layer k adds seven times k points.
Is the division always exact?
Yes, and the tool checks it before returning a value.
How fast do they grow?
Quadratically, like seven halves of n squared.
Are values exact?
Yes. Integer arithmetic is used.
What index range is accepted?
One through 100,000.