login
A136483
Number of unit square lattice cells inside quadrant of origin-centered circle of diameter n.
5
0, 0, 1, 1, 3, 4, 6, 8, 13, 15, 19, 22, 28, 30, 37, 41, 48, 54, 64, 69, 77, 83, 94, 98, 110, 119, 131, 139, 152, 162, 172, 183, 199, 208, 226, 234, 253, 263, 281, 294, 308, 322, 343, 357, 377, 390, 412, 424, 447, 465, 488, 504, 528, 545, 567, 585, 612, 628, 654
OFFSET
1,5
LINKS
FORMULA
a(n) = Sum_{k=1..floor(n/2)} floor(sqrt((n/2)^2 - k^2)).
Lim_{n -> oo} a(n)/(n^2) -> Pi/16 (A019683).
a(n) = (1/4) * A136485(n) = (1/2) * A136513(n).
a(n) = [x^(n^2)] (theta_3(x^4) - 1)^2 / (4 * (1 - x)). - Ilya Gutkovskiy, Nov 23 2021
EXAMPLE
a(5) = 3 because a circle of radius 5/2 in the first quadrant encloses (2,1), (1,1), (1,2).
MATHEMATICA
Table[Sum[Floor[Sqrt[(n/2)^2 -k^2]], {k, Floor[n/2]}], {n, 100}]
PROG
(Magma)
A136483:= func< n | n eq 1 select 0 else (&+[Floor(Sqrt((n/2)^2-j^2)): j in [1..Floor(n/2)]]) >;
[A136483(n): n in [1..100]]; // G. C. Greubel, Jul 28 2023
(SageMath)
def A136483(n): return sum(isqrt((n/2)^2-j^2) for j in range(1, (n//2)+1))
[A136483(n) for n in range(1, 101)] # G. C. Greubel, Jul 28 2023
(PARI) a(n) = sum(k=1, n\2, sqrtint((n/2)^2 - k^2)); \\ Michel Marcus, Jul 28 2023
CROSSREFS
Alternating merge of A136484 and A001182.
Sequence in context: A139041 A367081 A244607 * A240494 A280250 A356081
KEYWORD
easy,nonn
AUTHOR
Glenn C. Foster (gfoster(AT)uiuc.edu), Jan 02 2008
STATUS
approved