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.

Showing 1-4 of 4 results.

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

A136485 Number of unit square lattice cells enclosed by origin centered circle of diameter n.

Original entry on oeis.org

0, 0, 4, 4, 12, 16, 24, 32, 52, 60, 76, 88, 112, 120, 148, 164, 192, 216, 256, 276, 308, 332, 376, 392, 440, 476, 524, 556, 608, 648, 688, 732, 796, 832, 904, 936, 1012, 1052, 1124, 1176, 1232, 1288, 1372, 1428, 1508, 1560, 1648, 1696, 1788, 1860, 1952, 2016
Offset: 1

Views

Author

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

Keywords

Comments

a(n) is the number of complete squares that fit inside the circle with diameter n, drawn on squared paper.

Examples

			a(3) = 4 because a circle centered at the origin and of radius 3/2 encloses (-1,-1), (-1,1), (1,-1), (1,1).
		

Crossrefs

Alternating merge of A119677 of A136485.

Programs

  • Magma
    A136485:= func< n | n le 1 select 0 else 4*(&+[Floor(Sqrt((n/2)^2-j^2)): j in [1..Floor(n/2)]]) >;
    [A136485(n): n in [1..100]]; // G. C. Greubel, Jul 29 2023
    
  • Mathematica
    Table[4*Sum[Floor[Sqrt[(n/2)^2 - k^2]], {k,Floor[n/2]}], {n,100}]
  • SageMath
    def A136485(n): return 4*sum(floor(sqrt((n/2)^2-k^2)) for k in range(1,(n//2)+1))
    [A136485(n) for n in range(1,101)] # G. C. Greubel, Jul 29 2023

Formula

a(n) = 4 * Sum_{k=1..floor(n/2)} floor(sqrt((n/2)^2 - k^2)).
a(n) = 4 * A136483(n).
a(n) = 2 * A136513(n).
Lim_{n -> oo} a(n)/(n^2) -> Pi/4 (A003881).
a(n) = [x^(n^2)] (theta_3(x^4) - 1)^2 / (1 - x). - Ilya Gutkovskiy, Nov 24 2021

A136515 Number of unit square lattice cells inside half-plane (two adjacent quadrants) of origin centered circle of diameter 2n+1.

Original entry on oeis.org

0, 2, 6, 12, 26, 38, 56, 74, 96, 128, 154, 188, 220, 262, 304, 344, 398, 452, 506, 562, 616, 686, 754, 824, 894, 976, 1056, 1134, 1224, 1308, 1406, 1500, 1592, 1694, 1804, 1914, 2026, 2136, 2258, 2374, 2504, 2626, 2756, 2892, 3022, 3164, 3300, 3450, 3600
Offset: 0

Views

Author

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

Keywords

Comments

Number of unit square lattice cells inside two adjacent quadrants of origin centered circle of radius n+1/2.

Examples

			a(2) = 6 because a circle centered at the origin and of radius 2.5 encloses (-2,1),(-1,1),(-1,2),(2,1),(1,1),(1,2) in the upper half plane.
		

Crossrefs

Programs

  • Magma
    A136515:= func< n | n eq 0 select 0 else 2*(&+[Floor(Sqrt((n+1/2)^2-j^2)): j in [1..n]]) >;
    [A136515(n): n in [0..100]]; // G. C. Greubel, Jul 27 2023
    
  • Mathematica
    Table[2*Sum[Floor[Sqrt[(n +1/2)^2 -k^2]], {k,n}], {n,0,100}]
  • PARI
    a(n) = 2*sum(k=1, n, sqrtint((n+1/2)^2-k^2)); \\ Michel Marcus, Jul 27 2023
  • SageMath
    def A136515(n): return 2*sum(isqrt((n+1/2)^2-k^2) for k in range(1,n+1))
    [A136515(n) for n in range(101)] # G. C. Greubel, Jul 27 2023
    

Formula

a(n) = 2*Sum_{k=1..n} floor(sqrt((n+1/2)^2 - k^2)).
Lim_{n -> oo} a(n)/(n^2) -> Pi/8.
a(n) = 2 * A136484(n).
a(n) = (1/2)*A136486(2*n+1).

A136514 Number of unit square lattice cells inside half-plane (two adjacent quadrants) of origin centered circle of radius n.

Original entry on oeis.org

0, 2, 8, 16, 30, 44, 60, 82, 108, 138, 166, 196, 238, 278, 324, 366, 416, 468, 526, 588, 644, 714, 780, 848, 930, 1008, 1090, 1170, 1256, 1350, 1438, 1540, 1638, 1744, 1856, 1954, 2072, 2180, 2310, 2432, 2548, 2678, 2808, 2950, 3090, 3220, 3366, 3510, 3664
Offset: 1

Views

Author

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

Keywords

Examples

			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.
		

Crossrefs

Programs

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

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
Showing 1-4 of 4 results.