OFFSET
0,2
COMMENTS
a(n) is the number of complete squares that fit inside the circle with radius n+1/2, drawn on squared paper.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
FORMULA
EXAMPLE
a(1) = 4 because a circle centered at the origin and of radius 1+1/2 encloses (-1,-1), (-1,1), (1,-1), (1,1).
MATHEMATICA
Table[4*Sum[Floor[Sqrt[(n + 1/2)^2 - k^2]], {k, n}], {n, 0, 100}]
PROG
(Magma)
A136486:= func< n | n eq 0 select 0 else 4*(&+[Floor(Sqrt((n+1/2)^2-j^2)): j in [1..n]]) >;
[A136486(n): n in [0..100]]; // G. C. Greubel, Jul 30 2023
(SageMath)
def A136486(n): return 4*sum(floor(sqrt((n+1/2)^2-k^2)) for k in range(1, n+1))
[A136486(n) for n in range(101)] # G. C. Greubel, Jul 30 2023
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Glenn C. Foster (gfoster(AT)uiuc.edu), Jan 02 2008
STATUS
approved