cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A136483 Number of unit square lattice cells inside quadrant of origin-centered circle of diameter n.

Original entry on oeis.org

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

Views

Author

Glenn C. Foster (gfoster(AT)uiuc.edu), Jan 02 2008

Keywords

Examples

			a(5) = 3 because a circle of radius 5/2 in the first quadrant encloses (2,1), (1,1), (1,2).
		

Crossrefs

Alternating merge of A136484 and A001182.

Programs

  • 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
    
  • Mathematica
    Table[Sum[Floor[Sqrt[(n/2)^2 -k^2]], {k,Floor[n/2]}], {n,100}]
  • PARI
    a(n) = sum(k=1, n\2, sqrtint((n/2)^2 - k^2)); \\ Michel Marcus, 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
    

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