Centered Square Number Calculator
Count points in a square pattern built from a centre, using the sum of two consecutive squares.
What it does
Centered square numbers count dots in a pattern with one central dot and successive square layers around it. The sequence begins 1, 5, 13, 25 and 41. A convenient identity says the nth value is the sum of the squares of n and n plus one.
This family is distinct from ordinary square numbers, which count dots in a grid with a corner as its anchor. Here the pattern is centred, so the layers grow outward in all four diagonal directions.
The formula is two times n times n plus one, plus one, which is the same as n squared plus n plus one squared. Both forms give the same integer, and the tool uses the product form for exact computation.
This page reports the count together with the previous term and the ratio between them. It does not draw the arrangement, only tells how many points it contains.
The index limit is one hundred thousand, producing a value with about eleven digits printed in full.
How to use
- Enter an index n from 0 to 100,000.
- Read the centered square number in the main result box.
- Check the previous term and growth beside it.
- The default index 4 reproduces the worked example.
- Try n = 3 to confirm the value 25.
- Verify a small value by adding two consecutive squares.
Formula
- n
- The index of the centered square.
- C(n)
- The number of points in the pattern.
The kth layer adds four k points, so the total is one plus four times the sum from one to n. That sum is two n times n plus one, giving the formula. The identity with consecutive squares follows by expanding n squared plus n plus one squared.
Worked example
Example: index 4
The page opens with n = 4.
- Write the formula: C(4) = 2 x 4 x 5 + 1.
- Multiply four by five: 20.
- Double it: 40.
- Add one: 40 + 1 = 41.
- Check the identity: 4 squared plus 5 squared is 16 + 25 = 41.
- The tool reports 41, previous term 25, and growth 1.64x.
Reference table
| n | C(n) | Previous | Consecutive squares |
|---|---|---|---|
| 0 | 1 | n/a | 0 + 1 |
| 1 | 5 | 1 | 1 + 4 |
| 2 | 13 | 5 | 4 + 9 |
| 3 | 25 | 13 | 9 + 16 |
| 4 | 41 | 25 | 16 + 25 |
| 5 | 61 | 41 | 25 + 36 |
Limits
- Indices above 100,000 are rejected to keep the output readable.
- The growth column is rounded to two decimals.
- The tool counts points, not squares of lattice lines.
- This is the centred family, not ordinary square numbers.
Common mistakes
- Confusing centred squares with ordinary square numbers.
- Using n squared plus n squared instead of n squared plus n plus one squared.
- Forgetting the central point when deriving the formula.
- Expecting cubic growth from a quadratic formula.
- Starting the sequence at one, which would shift every value.
Try it yourself
Quick checks. Answers sit tucked under each question.
What is C(4)?
C(4) = 2 x 4 x 5 + 1 = 41, equal to 16 + 25.
What is C(3)?
C(3) = 25, equal to 9 + 16.
What is C(0)?
C(0) = 1, the central point alone.
Questions
How is this related to Pythagoras?
Every centered square number is the sum of two consecutive squares, the legs of a primitive Pythagorean triple.
How is this different from a square number?
A square number uses a corner as anchor, while a centered square grows from a central point.
How many points does a layer add?
Layer k adds four times k points.
What is the growth rate?
Quadratic, about two n squared for large n.
Are values exact?
Yes. Integer multiplication and addition are used.
What index range is accepted?
Zero through 100,000.