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-10 of 10 results.

A053416 Circle numbers (version 4): a(n)= number of points (i+j/2,j*sqrt(3)/2), i,j integers (triangular grid) contained in a circle of diameter n, centered at (0,0).

Original entry on oeis.org

1, 1, 7, 7, 19, 19, 37, 43, 61, 73, 91, 109, 127, 151, 187, 199, 241, 253, 301, 313, 367, 397, 439, 475, 517, 571, 613, 661, 721, 757, 823, 859, 931, 979, 1045, 1111, 1165, 1237, 1303, 1381, 1459, 1519, 1615, 1663, 1765, 1813, 1921, 1993, 2083, 2173, 2263
Offset: 0

Views

Author

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Jan 10 2000

Keywords

Comments

In other words, number of points in a hexagonal lattice covered by a circle of diameter n if the center of the circle is chosen at a grid point. - Hugo Pfoertner, Jan 07 2007
Same as above but "number of disks (r = 1)" instead of "number of points". See illustration in links. - Kival Ngaokrajang, Apr 06 2014

Crossrefs

Cf. A053411, A053414, A053415, A053417, A053458 (open disk), A308685 (bisection).

Programs

  • Maple
    A053416 := proc(d)
        local a,j,imin,imax ;
        a := 0 ;
        for j from -floor(d/sqrt(3)) do
            if j^2*3 > d^2 and j> 0 then
                break ;
            end if;
            imin := ceil((-j-sqrt(d^2-3*j^2))/2) ;
            imax := floor((-j+sqrt(d^2-3*j^2))/2) ;
            a := a+imax-imin+1 ;
        end do:
        a ;
    end proc:
    seq(A053416(d),d=0..30) ; # R. J. Mathar, Nov 22 2022
  • Mathematica
    a[n_] := Sum[Boole[4*(i^2 + i*j + j^2) <= n^2], {i, -n, n}, {j, -n, n}];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Jun 06 2013, updated Apr 08 2022 to correct a discrepancy wrt b-file noticed by Georg Fischer *)

Formula

a(n)/(n/2)^2->Pi*2/sqrt(3).
a(n) >= A053458(n). - R. J. Mathar, Nov 22 2022
a(2*n) = A308685(n). - R. J. Mathar, Nov 22 2022

Extensions

Edited by N. J. A. Sloane, Jul 03 2008 at the suggestion of R. J. Mathar

A053417 Circle numbers (version 5): a(n) = number of points (i+j/2,j*sqrt(3)/2), i,j integers (triangular grid) contained in a circle of diameter n, centered at (1/2,0).

Original entry on oeis.org

0, 2, 4, 10, 14, 24, 30, 48, 60, 76, 92, 110, 130, 154, 178, 208, 230, 264, 288, 330, 364, 406, 442, 482, 522, 564, 614, 664, 712, 766, 812, 874, 922, 990, 1050, 1112, 1176, 1240, 1312, 1382, 1452, 1530, 1598, 1684, 1750, 1840, 1920, 2008, 2092, 2182, 2266
Offset: 0

Views

Author

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Jan 10 2000

Keywords

Comments

Equivalently, number of points in a hexagonal lattice covered by a circular disk of diameter n if the center of the circle is chosen at the middle between two lattice points. - Hugo Pfoertner, Jan 07 2007
Same as above but "number of disks (r = 1)" instead of "number of points". a(2^n - 1) = A239073(n), n >= 1. See illustration in links. - Kival Ngaokrajang, Apr 06 2014

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[dj = Sqrt[Abs[4*n^2 + 6*i - 3*i^2 - 3]]/4; j1 = (1 - 2*i)/4 - dj // Floor; j2 = (1 - 2*i)/4 + dj // Ceiling; Sum[ Boole[i^2 - i - j/2 + i*j + j^2 + 1/4 <= n^2/4], {j, j1, j2}], {i, -n - 1, n + 3}]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jun 06 2013 *)

Formula

a(n)/(n/2)^2 -> Pi*2/sqrt(3).

Extensions

Edited by N. J. A. Sloane, Jul 03 2008 at the suggestion of R. J. Mathar

A053415 Circle numbers (version 3): a(n) = number of points (i,j), i,j integers, contained in a circle of diameter n, centered at (1/2, 1/2).

Original entry on oeis.org

0, 0, 4, 4, 12, 16, 32, 32, 52, 60, 80, 88, 112, 124, 156, 172, 208, 216, 256, 276, 316, 332, 384, 408, 448, 484, 540, 560, 616, 648, 716, 740, 812, 848, 912, 952, 1020, 1060, 1124, 1184, 1264, 1304, 1396, 1436, 1528, 1576, 1664, 1716, 1804, 1876, 1976
Offset: 0

Views

Author

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Jan 10 2000

Keywords

Crossrefs

Programs

  • Mathematica
    cx = 1/2; cy = 1/2; a[n_] := Sum[ dj = 1/2*Sqrt[ Abs[n^2 - 4*cx^2 + 8*cx*i - 4*i^2]]; j1 = cy - dj // Floor; j2 = cy + dj // Ceiling; Sum[Boole[ (i - cx)^2 + (j - cy)^2 <= n^2/4], {j, j1, j2}], {i, cx - n/2 // Floor, cx + n/2 // Ceiling}]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jun 06 2013 *)

Formula

a(n)/(n/2)^2 -> Pi.
a(n) = [x^(n^2)] theta_2(x^4)^2 / (1 - x). - Ilya Gutkovskiy, Nov 23 2021

A123690 Number of points in a square lattice covered by a circle of diameter n if the center of the circle is chosen such that the circle covers the maximum possible number of lattice points.

Original entry on oeis.org

2, 5, 9, 14, 22, 32, 41, 52, 69, 81, 97, 116, 137, 157, 180, 208, 231, 258, 293, 319, 351, 384, 421, 457, 495, 540, 578, 623, 667, 716, 761, 812, 861, 914, 973, 1025, 1085, 1142, 1201, 1268, 1328, 1396, 1460, 1528, 1597, 1669, 1745, 1816, 1893, 1976, 2053
Offset: 1

Views

Author

Hugo Pfoertner, Oct 09 2006, Feb 11 2007

Keywords

Comments

a(n) >= max(A053411(n), A053414(n), A053415(n)).
a(n) is an upper bound for the number of segments of a self avoiding path on the 2-dimensional square lattice such that the path fits into a circle of diameter n. A122224(n) <= a(n).

Examples

			a(1)=2: Circle with diameter 1 and center (0,0.5) covers 2 lattice points;
a(2)=5: Circle with diameter 2 and center (0,0) covers 5 lattice points;
a(3)=4: Circle with diameter 3 and center (0,0) covers 9 lattice points;
a(4)=14: Circle with diameter 4 and center (0.5,0.2) covers 14 lattice points.
		

Crossrefs

The corresponding sequences for the hexagonal lattice and the honeycomb net are A125852 and A127406, respectively.

Programs

  • Mathematica
    (* An exact program using the functions from A291259: *)
    Clear[a]; a[n_] := Module[{points, pairc, expcent, innerpoints, cn=Ceiling[n], allpairs},
    allpairs = Flatten[Table[{i, j}, {i, -cn, cn+1}, {j, -cn, cn+1}], 1];
    points = Select[allpairs, candidatePointQ[#, n]&];
    pairc = Select[Subsets[points, {2}], dd2@@#<=4n^2&];
    expcent = explorativeCenters[pairc, n];
    innerpoints = Count[allpairs, _?(innerPointQ[#, n]&)];
    Max[Table[Count[points, _?(dd2[#, center]<=n^2&)], {center, expcent}]] + innerpoints];
    Table[a[n/2], {n, 20}] (* Andrey Zabolotskiy, Feb 21 2018 *)

Extensions

a(21)-a(40) originally conjectured by Jean-François Alcover confirmed and moved to Data and more terms added by Andrey Zabolotskiy, Feb 21 2018

A053411 Circle numbers (version 1): a(n)= number of points (i,j), i,j integers, contained in a circle of diameter n, centered at the origin.

Original entry on oeis.org

1, 1, 5, 9, 13, 21, 29, 37, 49, 69, 81, 97, 113, 137, 149, 177, 197, 225, 253, 293, 317, 349, 377, 421, 441, 489, 529, 577, 613, 665, 709, 749, 797, 861, 901, 973, 1009, 1085, 1129, 1201, 1257, 1313, 1373, 1457, 1517, 1597, 1653, 1741, 1793, 1885, 1961
Offset: 0

Views

Author

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Jan 10 2000

Keywords

Comments

a(n)/(n/2)^2 -> Pi.

Crossrefs

Bisections: A000328 and A036704.

Programs

  • Mathematica
    a[n_] := (m = Ceiling[n/2]; Sum[Boole[i^2 + j^2 <= n^2/4], {i, -m, m}, {j, -Ceiling @ Sqrt[ m^2 - i^2 ], Ceiling @ Sqrt[ m^2 - i^2 ]}]); Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jun 06 2013 *)

A346993 Record numbers of grid points in a square lattice covered by a continuously growing circular disk if the center of the disk is chosen to cover the maximum possible number of grid points.

Original entry on oeis.org

1, 2, 4, 5, 6, 7, 9, 12, 13, 14, 16, 17, 21, 22, 24, 26, 27, 28, 32, 33, 37, 38, 39, 40, 41, 44, 45, 46, 47, 48, 52, 56, 57, 58, 59, 61, 62, 63, 64, 65, 69, 70, 71, 72, 73, 74, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 89, 90, 91, 92, 93, 94, 97, 98, 99, 100, 104, 112, 113
Offset: 1

Views

Author

Hugo Pfoertner, Aug 16 2021

Keywords

Examples

			     Diameter  Covered      R^2 =
     of disk   grid        (D/2)^2 =
   n    D      points  A346994(n)/A346995(n)
.
   1 0.00000     1           0   /    1
   2 1.00000     2           1   /    4
   3 1.41421     4           1   /    2
   4 2.00000     5           1   /    1
   5 2.23607     6           5   /    4
   6 2.50000     7          25   /   16
   7 2.82843     9           2   /    1
   8 3.16228    12           5   /    2
   9 3.67696    13         169   /   50
  10 3.80058    14          65   /   18
  11 4.12311    16          17   /    4
  12 4.33333    17         169   /   36
  13 4.47214    21           5   /    1
		

Crossrefs

The corresponding squared radii are A346994/A346995.

A053479 Circle numbers (version 6): a(n) = number of points (i+j/2,j*sqrt(3)/2), i,j integers (triangular grid) contained in a circle of diameter n, centered at (1/2, 1/(2*sqrt(3))).

Original entry on oeis.org

0, 0, 3, 6, 12, 21, 30, 42, 54, 69, 90, 102, 129, 150, 174, 198, 225, 258, 288, 327, 354, 396, 435, 471, 522, 558, 609, 654, 702, 759, 807, 864, 924, 981, 1038, 1104, 1173, 1230, 1308, 1368, 1443, 1512, 1590, 1671, 1746, 1830, 1908, 2001, 2076, 2166, 2265
Offset: 0

Views

Author

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Jan 14 2000

Keywords

Comments

In other words, number of points in a hexagonal lattice covered by a circular disk of diameter n if the center of the circle is chosen at the deep hole. - Hugo Pfoertner, Jan 07 2007
Also number of integer coordinate pairs (s,t) satisfying s^2+t^2+st-s-t <= n^2/4-1/3. The a(2)=3 coordinate pairs are (s,t)=(0,0), (0,1) and (1,0). The a(3)=6 coordinate pairs are (-1,1),(0,0),(0,1),(1,-1),(1,0) and (1,1). - R. J. Mathar, Feb 23 2007

Crossrefs

Programs

  • Maple
    A053479 := proc(n) local res,a,b ; res :=0 ; for a from -n to n do for b from -n to n do if a^2+b^2+a*b-a-b <= n^2/4-1/3 then res := res+1 ; fi ; od ; od ; RETURN(res) ; end : for n from 1 to 40 do printf("%d ",A053479(n)) ; od ; # R. J. Mathar, Feb 23 2007
  • Mathematica
    cx = 1/2; cy = 1/(2*Sqrt[3]); a[n_] := Sum[ dj = (1/2)* Sqrt[Abs[-3*cx^2 + 2*Sqrt[3]*cx*cy - cy^2 + 6*cx*i - 2*Sqrt[3]*cy*i - 3*i^2 + n^2]]; j1 = cx/2 + (Sqrt[3]*cy)/2 - i/2 - dj // Floor ; j2 = cx/2 + (Sqrt[3]*cy)/2 - i/2 + dj // Ceiling; Sum[Boole[(i + j/2 - cx)^2 + (j*(Sqrt[3]/2) - cy)^2 <= n^2/4], {j, j1, j2}], {i, -(n + 1)/2 - 2 // Floor, (n + 1)/2 + 3 // Ceiling}]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jun 06 2013 *)

Formula

a(n)/(n/2)^2 -> Pi*2/sqrt(3).

Extensions

Edited by N. J. A. Sloane, Jul 03 2008 at the suggestion of R. J. Mathar

A123689 Number of points in a square lattice covered by a circle of diameter n if the center of the circle is chosen such that the circle covers the minimum possible number of lattice points.

Original entry on oeis.org

0, 2, 4, 10, 16, 26, 32, 46, 60, 74, 88, 108, 124, 146, 172, 194, 216, 248, 276, 308
Offset: 1

Views

Author

Hugo Pfoertner, Oct 09 2006

Keywords

Comments

a(n)<=min(A053411(n),A053414(n),A053415(n)).
Using brute force computation and a step size of 1/1000 (though 1/200 suffices), the [conjectured] terms a(21) to a(40) would be: 332, 374, 408, 438, 484, 522, 560, 608, 648, 698, 740, 794, 846, 894, 952, 1006, 1060, 1124, 1184, 1248. - Jean-François Alcover, Jan 08 2018

Examples

			a(1)=0: Circle with diameter 1 with center (0.5,0.5) covers no lattice points; a(2)=2: Circle with diameter 2 with center (0,eps) covers 2 lattice points;
a(3)=4: Circle with diameter 3 with center (0.5,0.5) covers 4 lattice points.
		

Crossrefs

The corresponding sequences for the hexagonal lattice and the honeycomb net are A125851 and A127405, respectively.

Programs

  • Mathematica
    dx = 1/200; y0 = 0; (* To speed up computation, the step size dx is experimentally adjusted and the circle center is taken on the x-axis. *)
    cnt[pts_, ctr_, r_] := Count[pts, pt_ /; Norm[pt - ctr] <= r];
    a[n_] := Module[{r, pts, innerCnt, an, center}, r = n/2; pts = Select[ Flatten[ Table[{x, y}, {x, -r - 1, r + 1}, {y, -r - 1, r + 1}], 1], r - 1 <= Norm[#] <= r + 1 &]; innerCnt = Sum[If[Norm[{x, y}] < r - 1, 1, 0], {x, -r - 1, r + 1}, {y, -r - 1, r + 1}]; {an, center} = Table[{innerCnt + cnt[pts, {x, y0}, r], {x, y0}}, {x, -1/2, 1/2, dx}] // Sort // First; Print["a(", n, ") = ", an, ", center = ", center // InputForm]; an];
    Table[a[n], {n, 1, 20}] (* Jean-François Alcover, Jan 08 2018 *)

A127404 Number of points in a honeycomb net covered by a circular disk of diameter n if the center of the circle is chosen at mid-edge between two grid points.

Original entry on oeis.org

2, 2, 6, 10, 16, 20, 34, 36, 50, 58, 72, 86, 106, 116, 138, 154, 176, 190, 222, 234, 270, 292
Offset: 1

Views

Author

Hugo Pfoertner, Feb 08 2007

Keywords

Examples

			a(1)=2 because a disk of diameter 1 centered at the middle of an edge covers the 2 net points bounding this edge.
		

Crossrefs

Cf. A127402, A127403, A127405, A127406. The corresponding sequences for the square lattice and hexagonal lattice are A053414 and A053417, respectively.

A053457 Open disk numbers (version 2): a(n) is the number of points (i,j), i,j, integers, contained in an open disk of diameter n, centered at (0,1/2).

Original entry on oeis.org

0, 0, 2, 6, 12, 16, 26, 38, 48, 60, 78, 94, 108, 128, 154, 174, 196, 224, 250, 278, 312, 344, 378, 410, 452, 484, 526, 574, 612, 652, 698, 754, 800, 848, 906, 958, 1012, 1068, 1130, 1190, 1252, 1316, 1378, 1446, 1516, 1588, 1654, 1730, 1808, 1880, 1954
Offset: 0

Views

Author

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Jan 13 2000

Keywords

Comments

a(n)/(n/2)^2->Pi

Crossrefs

Showing 1-10 of 10 results.