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

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

Original entry on oeis.org

0, 0, 2, 2, 6, 8, 12, 16, 26, 30, 38, 44, 56, 60, 74, 82, 96, 108, 128, 138, 154, 166, 188, 196, 220, 238, 262, 278, 304, 324, 344, 366, 398, 416, 452, 468, 506, 526, 562, 588, 616, 644, 686, 714, 754, 780, 824, 848, 894, 930, 976, 1008, 1056, 1090, 1134, 1170
Offset: 1

Views

Author

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

Keywords

Examples

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

Crossrefs

Alternating merge of A136514 and A136515.

Programs

  • Magma
    A136513:= func< n | n eq 1 select 0 else 2*(&+[Floor(Sqrt((n/2)^2-j^2)): j in [1..Floor(n/2)]]) >;
    [A136513(n): n in [1..100]]; // G. C. Greubel, Jul 27 2023
    
  • Mathematica
    Table[2*Sum[Floor[Sqrt[(n/2)^2 -k^2]], {k,Floor[n/2]}], {n,100}]
  • PARI
    a(n) = 2*sum(k=1, n\2, sqrtint((n/2)^2-k^2)); \\ Michel Marcus, Jul 27 2023
  • SageMath
    def A136513(n): return 2*sum(isqrt((n/2)^2-k^2) for k in range(1,(n//2)+1))
    [A136513(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..floor(n/2)} floor(sqrt((n/2)^2 - k^2)).
a(n) = 2 * A136483(n).
a(n) = (1/2) * A136485(n).
a(n) = [x^(n^2)] (theta_3(x^4) - 1)^2 / (2 * (1 - x)). - Ilya Gutkovskiy, Nov 24 2021

A136486 Number of unit square lattice cells enclosed by origin centered circle of diameter 2n+1.

Original entry on oeis.org

0, 4, 12, 24, 52, 76, 112, 148, 192, 256, 308, 376, 440, 524, 608, 688, 796, 904, 1012, 1124, 1232, 1372, 1508, 1648, 1788, 1952, 2112, 2268, 2448, 2616, 2812, 3000, 3184, 3388, 3608, 3828, 4052, 4272, 4516, 4748, 5008, 5252, 5512, 5784, 6044, 6328, 6600
Offset: 0

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 radius n+1/2, drawn on squared paper.

Examples

			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).
		

Crossrefs

Programs

  • 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
    
  • Mathematica
    Table[4*Sum[Floor[Sqrt[(n + 1/2)^2 - k^2]], {k,n}], {n, 0, 100}]
  • 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

Formula

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

A372847 Number of unit squares enclosed by a circle of radius n with an even number of rows and the maximum number of squares in each row.

Original entry on oeis.org

0, 6, 18, 36, 64, 92, 130, 172, 224, 284, 344, 410, 488, 570, 658, 750, 852, 956, 1072, 1194, 1312, 1450, 1584, 1728, 1882, 2044, 2204, 2372, 2548, 2730, 2916, 3112, 3312, 3520, 3738, 3950, 4184, 4408, 4656, 4900, 5146, 5402, 5670, 5942, 6222, 6492, 6784, 7080, 7382, 7700
Offset: 1

Views

Author

David Dewan, May 14 2024

Keywords

Comments

Always has an even number of rows (2*n-2) and each row may have an odd or even number of squares.
Symmetrical about the horizontal and vertical axes.

Examples

			For n=4
row 1:   5 squares
row 2:   6 squares
row 3:   7 squares
row 4:   7 squares
row 5:   6 squares
row 6:   5 squares
Total = 36
		

Crossrefs

Cf. A136485 (by diameter), A001182 (within quadrant), A136483 (quadrant by diameter), A119677 (even number of rows with even number of squares in each), A125228 (odd number of rows with maximal squares per row), A341198 (points rather than squares).

Programs

  • Mathematica
    a[n_]:=2 Sum[Floor[2 Sqrt[n^2 - k^2]], {k,n-1}]; Array[a,50]

Formula

a(n) = 2*Sum_{k=1..n-1} floor(2*sqrt(n^2 - k^2)).
Showing 1-4 of 4 results.