Centered Octagonal Number Calculator

Find the centered octagonal number at an index, which is also the odd square at that position.

Math and PercentUpdated 2026-11-182 min read
Centered Octagonal Number Calculator
A whole number from 0 to 100,000.
Centered octagonal number
...
Previous term...
Growth from previous...

What it does

Centered octagonal numbers count points in an octagonal pattern grown from a centre. A striking fact about this family is that its values are exactly the odd squares. The sequence begins 1, 9, 25, 49, 81 and 121.

The coincidence is not accidental. A centred octagonal figure can be rearranged into a square whose side is two n plus one, which is always odd. That is why the nth centred octagonal number equals the square of the nth odd integer.

The formula is two n plus one, squared. It is an integer for every n and needs no division. The indexing here starts at zero, matching the standard sequence where the first value is one.

This page computes the value with exact integer arithmetic and shows the previous term and ratio beside it. It gives counts only, not a drawing of the arrangement.

The index limit is one hundred thousand, which gives a value with about eleven digits printed in full.

How to use

  1. Enter an index n from 0 to 100,000.
  2. Read the centered octagonal number in the main result box.
  3. Check the previous term and growth beside it.
  4. The default index 3 reproduces the worked example.
  5. Try n = 4 to confirm the value 81.
  6. Verify the result by squaring two n plus one.

Formula

C(n) = (2n + 1)^2
n
The index, starting at zero.
C(n)
The centered octagonal number, equal to the nth odd square.

The general centred polygonal formula with eight sides simplifies to four n squared plus four n plus one, which factors as two n plus one squared. The value at n = 0 is one and the value at n = 1 is nine.

Worked example

Example: index 3

The page opens with n = 3.

  1. Compute two n plus one: 2 x 3 + 1 = 7.
  2. Square it: 7 x 7 = 49.
  3. The tool reports 49, previous term 25, and growth 1.96x.
  4. Check the previous value: 2 x 2 + 1 = 5, and 5 squared is 25.
  5. The value 49 is also the seventh square number and an odd square.
  6. With four layers the count reaches 81, the square of nine.

Reference table

Centered octagonal numbers as odd squares
n2n + 1C(n)Previous
011n/a
1391
25259
374925
498149
51112181

Limits

  • 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.
  • Only the standard centred octagonal offset starting at zero is used.

Common mistakes

  • Using the ordinary octagonal number instead of the centred one.
  • Squaring two n rather than two n plus one.
  • Starting the index at one and shifting every value.
  • Expecting a cubic formula when the sequence is quadratic.
  • Confusing this with the octahedral numbers.

Try it yourself

Quick checks. Answers sit tucked under each question.

What is C(3)?

C(3) = 7 squared = 49.

What is C(4)?

C(4) = 9 squared = 81.

Why are these odd squares?

Two n plus one is always odd, and the formula squares it.

Questions

Are these the same as odd squares?

Yes, every centred octagonal number is the square of an odd integer.

Why does the formula simplify so far?

The centred octagonal formula factors into a perfect square.

Where does indexing start?

At zero, giving the value one for the centre alone.

How fast do they grow?

Quadratically, like four n squared.

Are values exact?

Yes. Integer multiplication is used.

What index range is accepted?

Zero through 100,000.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.