Centered square number


In elementary number theory, a centered square number is a centered figurate number that gives the number of dots in a square with a dot in the center and all other dots surrounding the center dot in successive square layers. That is, each centered square number equals the number of dots within a given city block distance of the center dot on a regular square lattice. While centered square numbers, like figurate numbers in general, have few if any direct practical applications, they are sometimes studied in recreational mathematics for their elegant geometric and arithmetic properties.
The figures for the first four centered square numbers are shown below:

Relationships with other figurate numbers

The nth centered square number, C4,n, is given by the formula
In other words, a centered square number is the sum of two consecutive square numbers. The following pattern demonstrates this formula:
The formula can also be expressed as
that is, the nth centered square number is half of the nth odd square number plus one, as illustrated below:
Like all centered polygonal numbers, centered square numbers can also be expressed in terms of triangular numbers:
where
is the nth triangular number. This can be easily seen by removing the center dot and dividing the rest of the figure into four triangles, as below:
The difference between two consecutive octahedral numbers is a centered square number.

Properties

The first few centered square numbers are:
All centered square numbers are odd, and in base 10 one can notice the one's digits follows the pattern 1-5-3-5-1.
All centered square numbers and their divisors have a remainder of one when divided by four. Hence all centered square numbers and their divisors end with digits 1 or 5 in base 6, 8 or 12.
Every centered square number except 1 is the hypotenuse of a Pythagorean triple. This is exactly the sequence of Pythagorean triples where the two longest sides differ by 1.