OFFSET
1,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
FORMULA
Lim_{n -> oo} a(n)/(n^2) -> Pi/8.
a(n) = 2 * Sum_{k=1..n-1} floor(sqrt(n^2 - k^2)).
a(n) = A136513(2*n).
a(n) = 2*A001182(n). - R. J. Mathar, Jan 10 2008
EXAMPLE
a(2) = 2 because a circle centered at the origin and of radius 2 encloses (-1,1) and (1,1) in the upper half plane.
MATHEMATICA
Table[2*Sum[Floor[Sqrt[n^2 -k^2]], {k, n-1}], {n, 100}]
PROG
(Magma)
A136514:= func< n | n eq 1 select 0 else 2*(&+[Floor(Sqrt(n^2-j^2)): j in [1..n-1]]) >;
[A136514(n): n in [1..100]]; // G. C. Greubel, Jul 27 2023
(SageMath)
def A136514(n): return 2*sum(isqrt(n^2-k^2) for k in range(1, n))
[A136514(n) for n in range(1, 101)] # G. C. Greubel, Jul 27 2023
(PARI) a(n) = 2*sum(k=1, n-1, sqrtint(n^2-k^2)); \\ Michel Marcus, Jul 27 2023
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Glenn C. Foster (gfoster(AT)uiuc.edu), Jan 02 2008
STATUS
approved