Centered Triangular Number Calculator

Count points in a triangular pattern built from a centre and successive triangular layers.

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

What it does

Centered triangular numbers count dots in a pattern that starts with one central dot and adds triangular layers around it. The first few values are 1, 4, 10, 19, 31 and 46. Each new layer contributes three times the layer number, so the count grows quadratically.

This family differs from the ordinary triangular numbers, which nest triangles sharing a corner. Here the figure grows outward from a central point, which changes both the starting value and the formula.

The closed form is three times n times n minus one, divided by two, then plus one. The division is exact for every integer n because either n or n minus one is even.

This page computes the term with exact integer arithmetic and shows the previous value and growth. The indexing begins at one, which is the single central dot.

The index limit is one hundred thousand, so the printed result stays around ten digits.

How to use

  1. Enter an index n from 1 to 100,000.
  2. Read the centered triangular number in the main result box.
  3. Check the previous term and growth beside it.
  4. The default index 5 reproduces the worked example.
  5. Try n = 4 to confirm the value 19.
  6. Remember that index 1 is the centre alone.

Formula

C(n) = 3n(n - 1)/2 + 1
n
The index, starting at one for the centre.
C(n)
The centered triangular number at that index.

The kth layer adds three k points, so the total is one plus three times the sum from one to n minus one. That sum is n times n minus one over two, giving the formula. The value at n = 1 is one.

Worked example

Example: index 5

The page opens with n = 5.

  1. Compute n times n minus one: 5 x 4 = 20.
  2. Multiply by three: 60.
  3. Divide by two: 60 / 2 = 30.
  4. Add one for the centre: 30 + 1 = 31.
  5. The tool reports 31, previous term 19, and growth 1.63x.
  6. Check the layer sum: 1 + 3 + 6 + 9 + 12 = 31.

Reference table

Centered triangular numbers
nC(n)PreviousGrowth
11n/an/a
2414.00x
31042.50x
419101.90x
531191.63x
646311.48x

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.
  • This is the centred family, not ordinary triangular numbers.

Common mistakes

  • Starting the index at zero and expecting one there.
  • Confusing centred with ordinary triangular numbers.
  • Using three n times n plus one instead of three n times n minus one.
  • Forgetting to add the centre at the end.
  • Expecting cubic growth when the formula is quadratic.

Try it yourself

Quick checks. Answers sit tucked under each question.

What is C(5)?

C(5) = 3 x 5 x 4 / 2 + 1 = 31.

What is C(4)?

C(4) = 3 x 4 x 3 / 2 + 1 = 19.

What is C(1)?

C(1) = 1, the central dot alone.

Questions

How is this different from triangular numbers?

Centred triangles grow from a central point, while ordinary triangles share a corner.

Why does the index start at one?

Index one is defined as the single central dot.

How many points does each layer add?

Layer k adds three times k points.

Is the division always exact?

Yes, because one of n and n minus one is even.

Are values exact?

Yes. Integer arithmetic is used throughout.

What index range is accepted?

One 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.