login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A373193
On a unit square grid, the number of squares enclosed by a circle of radius n with origin at the center of a square.
1
1, 5, 21, 37, 61, 89, 129, 177, 221, 277, 341, 401, 489, 561, 657, 749, 845, 949, 1049, 1185, 1313, 1441, 1573, 1709, 1877, 2025, 2185, 2361, 2529, 2709, 2901, 3101, 3305, 3505, 3713, 3917, 4157, 4397, 4637, 4865, 5121, 5377, 5637, 5917, 6197, 6485, 6761
OFFSET
1,2
COMMENTS
This corresponds to a circle of radius n with center at 1/2,1/2 on a unit square grid.
Always has an odd number of rows (2 n - 1) with an odd number of squares in each row.
Symmetrical about the horizontal and vertical axes.
FORMULA
a(n) = 4*Sum_{k=1..n-1} floor(sqrt(n^2 - (k+1/2)^2) - 1/2) + 4*n - 3.
EXAMPLE
For n=4:
row 1: 3 squares - - X X X - -
row 2: 5 squares - X X X X X -
row 3: 7 squares X X X X X X X
row 4: 7 squares X X X X X X X
row 5: 7 squares X X X X X X X
row 6: 5 squares - X X X X X -
row 7: 3 squares - - X X X - -
Total = 37 = a(4).
MATHEMATICA
Table[4Sum[Floor[Sqrt[n^2-(k+1/2)^2]-1/2], {k, 1, n-1}]+4n-3, {n, 50}]
CROSSREFS
Cf. A119677 (on unit square grid with circle center at origin), A372847 (even number of rows with maximal squares per row), A125228 (odd number of rows with maximal squares per row), A000328 (number of squares whose centers are inside the circle).
Sequence in context: A302873 A170837 A170876 * A341198 A038844 A303521
KEYWORD
nonn
AUTHOR
David Dewan, May 27 2024
STATUS
approved