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:




 * - align="center" valign="middle" style="line-height: 0;"
 * [[Image:GrayDot.svg|16px]]
 * [[Image:GrayDot.svg|16px]] [[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]] [[Image:GrayDot.svg|16px]]
 * [[Image:GrayDot.svg|16px]] [[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]] [[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]] [[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]] [[Image:GrayDot.svg|16px]]
 * [[Image:GrayDot.svg|16px]] [[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]] [[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]] [[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]] [[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]] [[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]] [[Image:GrayDot.svg|16px]]
 * - align="center" valign="top"
 * $$C_{4,1} = 1$$
 * $$C_{4,2} = 5$$
 * $$C_{4,3} = 13$$
 * $$C_{4,4} = 25$$
 * }
 * - align="center" valign="top"
 * $$C_{4,1} = 1$$
 * $$C_{4,2} = 5$$
 * $$C_{4,3} = 13$$
 * $$C_{4,4} = 25$$
 * }
 * $$C_{4,3} = 13$$
 * $$C_{4,4} = 25$$
 * }
 * $$C_{4,4} = 25$$
 * }
 * }

Each centered square number is the sum of successive squares. Example: as shown in the following figure of Floyd's triangle, 25 is a centered square number, and is the sum of the square 16 (yellow rhombus formed by shearing a square) and of the next smaller square, 9 (sum of two blue triangles):



Relationships with other figurate numbers
Let Ck,n generally represent the nth centered k-gonal number. The nth centered square number is given by the formula:


 * $$C_{4,n} = n^2 + (n - 1)^2.$$

That is, the nth centered square number is the sum of the nth and the (n – 1)th square numbers. The following pattern demonstrates this formula:




 * - align="center" valign="middle" style="line-height: 0;"
 * [[Image:GrayDot.svg|16px]]
 * [[Image:RedDot.svg|16px]] [[Image:RedDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:RedDot.svg|16px]] [[Image:RedDot.svg|16px]]
 * [[Image:GrayDot.svg|16px]] [[Image:GrayDot.svg|16px]][[Image:RedDot.svg|16px]][[Image:GrayDot.svg|16px]] [[Image:GrayDot.svg|16px]][[Image:RedDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:RedDot.svg|16px]][[Image:GrayDot.svg|16px]] [[Image:GrayDot.svg|16px]][[Image:RedDot.svg|16px]][[Image:GrayDot.svg|16px]] [[Image:GrayDot.svg|16px]]
 * [[Image:RedDot.svg|16px]] [[Image:RedDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:RedDot.svg|16px]] [[Image:RedDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:RedDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:RedDot.svg|16px]] [[Image:RedDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:RedDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:RedDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:RedDot.svg|16px]] [[Image:RedDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:RedDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:RedDot.svg|16px]] [[Image:RedDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:RedDot.svg|16px]] [[Image:RedDot.svg|16px]]
 * - align="center" valign="top"
 * $$C_{4,1} = 0 + 1$$
 * $$C_{4,2} = 1 + 4$$
 * $$C_{4,3} = 4 + 9$$
 * $$C_{4,4} = 9 + 16$$
 * }
 * - align="center" valign="top"
 * $$C_{4,1} = 0 + 1$$
 * $$C_{4,2} = 1 + 4$$
 * $$C_{4,3} = 4 + 9$$
 * $$C_{4,4} = 9 + 16$$
 * }
 * $$C_{4,3} = 4 + 9$$
 * $$C_{4,4} = 9 + 16$$
 * }
 * $$C_{4,4} = 9 + 16$$
 * }
 * }

The formula can also be expressed as:


 * $$C_{4,n} = \frac{(2n-1)^2 + 1}{2}.$$

That is, the nth centered square number is half of the nth odd square number plus 1, as illustrated below:




 * - align="center" valign="bottom" style="line-height: 0;"
 * [[Image:GrayDot.svg|16px]]
 * [[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]] [[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:MissingDot.svg|16px]] [[Image:MissingDot.svg|16px]][[Image:MissingDot.svg|16px]][[Image:MissingDot.svg|16px]]
 * [[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]] [[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]] [[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:MissingDot.svg|16px]][[Image:MissingDot.svg|16px]] [[Image:MissingDot.svg|16px]][[Image:MissingDot.svg|16px]][[Image:MissingDot.svg|16px]][[Image:MissingDot.svg|16px]][[Image:MissingDot.svg|16px]] [[Image:MissingDot.svg|16px]][[Image:MissingDot.svg|16px]][[Image:MissingDot.svg|16px]][[Image:MissingDot.svg|16px]][[Image:MissingDot.svg|16px]]
 * [[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]] [[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]] [[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]] [[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:MissingDot.svg|16px]][[Image:MissingDot.svg|16px]][[Image:MissingDot.svg|16px]] [[Image:MissingDot.svg|16px]][[Image:MissingDot.svg|16px]][[Image:MissingDot.svg|16px]][[Image:MissingDot.svg|16px]][[Image:MissingDot.svg|16px]][[Image:MissingDot.svg|16px]][[Image:MissingDot.svg|16px]] [[Image:MissingDot.svg|16px]][[Image:MissingDot.svg|16px]][[Image:MissingDot.svg|16px]][[Image:MissingDot.svg|16px]][[Image:MissingDot.svg|16px]][[Image:MissingDot.svg|16px]][[Image:MissingDot.svg|16px]] [[Image:MissingDot.svg|16px]][[Image:MissingDot.svg|16px]][[Image:MissingDot.svg|16px]][[Image:MissingDot.svg|16px]][[Image:MissingDot.svg|16px]][[Image:MissingDot.svg|16px]][[Image:MissingDot.svg|16px]]
 * - align="center" valign="top"
 * $$C_{4,1} = \frac{1 + 1}{2}$$
 * $$C_{4,2} = \frac{9 + 1}{2}$$
 * $$C_{4,3} = \frac{25 + 1}{2}$$
 * $$C_{4,4} = \frac{49 + 1}{2}$$
 * }
 * - align="center" valign="top"
 * $$C_{4,1} = \frac{1 + 1}{2}$$
 * $$C_{4,2} = \frac{9 + 1}{2}$$
 * $$C_{4,3} = \frac{25 + 1}{2}$$
 * $$C_{4,4} = \frac{49 + 1}{2}$$
 * }
 * $$C_{4,3} = \frac{25 + 1}{2}$$
 * $$C_{4,4} = \frac{49 + 1}{2}$$
 * }
 * $$C_{4,4} = \frac{49 + 1}{2}$$
 * }
 * }

Like all centered polygonal numbers, centered square numbers can also be expressed in terms of triangular numbers:


 * $$C_{4,n} = 1 + 4\ T_{n-1} = 1 + 2{n(n-1)},$$

where


 * $$T_n = \frac{n(n+1)}{2} = \binom{n+1}{2}$$

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:




 * - align="center" valign="middle" style="line-height: 0;"
 * [[Image:BlackDot.svg|16px]]
 * [[Image:RedDot.svg|16px]] [[Image:GrayDot.svg|16px]][[Image:BlackDot.svg|16px]][[Image:GrayDot.svg|16px]] [[Image:RedDot.svg|16px]]
 * [[Image:RedDot.svg|16px]] [[Image:RedDot.svg|16px]][[Image:RedDot.svg|16px]][[Image:GrayDot.svg|16px]] [[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:BlackDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]] [[Image:GrayDot.svg|16px]][[Image:RedDot.svg|16px]][[Image:RedDot.svg|16px]] [[Image:RedDot.svg|16px]]
 * [[Image:RedDot.svg|16px]] [[Image:RedDot.svg|16px]][[Image:RedDot.svg|16px]][[Image:GrayDot.svg|16px]] [[Image:RedDot.svg|16px]][[Image:RedDot.svg|16px]][[Image:RedDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]] [[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:BlackDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]] [[Image:GrayDot.svg|16px]][[Image:GrayDot.svg|16px]][[Image:RedDot.svg|16px]][[Image:RedDot.svg|16px]][[Image:RedDot.svg|16px]] [[Image:GrayDot.svg|16px]][[Image:RedDot.svg|16px]][[Image:RedDot.svg|16px]] [[Image:RedDot.svg|16px]]
 * - align="center" valign="top"
 * $$C_{4,1} = 1$$
 * $$C_{4,2} = 1 + 4 \times 1$$
 * $$C_{4,3} = 1 + 4 \times 3$$
 * $$C_{4,4} = 1 + 4 \times 6$$
 * }
 * - align="center" valign="top"
 * $$C_{4,1} = 1$$
 * $$C_{4,2} = 1 + 4 \times 1$$
 * $$C_{4,3} = 1 + 4 \times 3$$
 * $$C_{4,4} = 1 + 4 \times 6$$
 * }
 * $$C_{4,3} = 1 + 4 \times 3$$
 * $$C_{4,4} = 1 + 4 \times 6$$
 * }
 * $$C_{4,4} = 1 + 4 \times 6$$
 * }
 * }

The difference between two consecutive octahedral numbers is a centered square number (Conway and Guy, p.50).

Another way the centered square numbers can be expressed is:


 * $$C_{4,n} = 1 + 4 \dim (SO(n)),$$

where


 * $$\dim (SO(n)) = \frac{n(n-1)}{2}.$$

Yet another way the centered square numbers can be expressed is in terms of the centered triangular numbers:


 * $$C_{4,n} = \frac{4C_{3,n}-1}{3},$$

where


 * $$C_{3,n} = 1 + 3\frac{n(n-1)}{2}.$$

List of centered square numbers
The first centered square numbers (C4,n < 4500) are:


 * 1, 5, 13, 25, 41, 61, 85, 113, 145, 181, 221, 265, 313, 365, 421, 481, 545, 613, 685, 761, 841, 925, 1013, 1105, 1201, 1301, 1405, 1513, 1625, 1741, 1861, 1985, 2113, 2245, 2381, 2521, 2665, 2813, 2965, 3121, 3281, 3445, 3613, 3785, 3961, 4141, 4325, ….

Properties
All centered square numbers are odd, and in base 10 one can notice the one's digit follows the pattern 1-5-3-5-1.

All centered square numbers and their divisors have a remainder of 1 when divided by 4. Hence all centered square numbers and their divisors end with digit 1 or 5 in base 6, 8, and 12.

Every centered square number except 1 is the hypotenuse of a Pythagorean triple (3-4-5, 5-12-13, 7-24-25, ...). This is exactly the sequence of Pythagorean triples where the two longest sides differ by 1. (Example: 52 + 122 = 132.)

This is not to be confused with the relationship (n – 1)2 + n2 = C4,n. (Example: 22 + 32 = 13.)

Generating function
The generating function that gives the centered square numbers is:
 * $$\frac{(x+1)^2}{(1-x)^3}= 1+5x+13x^2+25x^3+41x^4+~...~. $$