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.
LINKS
David Dewan, Table of n, a(n) for n = 1..10000
David Dewan, Drawings for n=1..10
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
KEYWORD
nonn
AUTHOR
David Dewan, May 27 2024
STATUS
approved