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.
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
Keywords
Links
- Thomas Otten, Illustration of initial terms.
Crossrefs
Programs
-
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
Formula
a(n) = 4*A237526(n^2 + 1).
Comments