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”).

A374532
Number of complete unit squares that fit inside a circle of radius sqrt(n^2+1) centered at the origin of a square lattice.
1
0, 4, 12, 24, 40, 68, 96, 132, 180, 224, 284, 340, 408, 492, 564, 656, 740, 848, 960, 1060, 1184, 1304, 1444, 1576, 1704, 1868, 2024, 2196, 2356, 2520, 2716, 2892, 3104, 3292, 3504, 3720, 3916, 4160, 4384, 4628, 4872, 5108, 5372, 5640, 5916, 6188, 6456, 6764, 7036
OFFSET
0,2
FORMULA
a(n) = 4*A237526(n^2 + 1).
PROG
(PARI) a(n) = my(s=n^2+1); 4*sum(k=1, sqrtint(s), sqrtint(s-k^2)) \\ Andrew Howroyd, Jul 11 2024
(Python)
def A374532(n): return sum(isqrt(k*((n<<1)-k)+1) for k in range(n))<<2 # Chai Wah Wu, Jul 18 2024
CROSSREFS
Cf. A119677 (case for radius of n), A237526.
Cf. A046092, A000328 (quadrant width 1 cell).
Sequence in context: A008216 A008074 A008190 * A008193 A010897 A301048
KEYWORD
nonn
AUTHOR
Thomas Otten, Jul 10 2024
STATUS
approved