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-6 of 6 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

A125852 Number of points in a hexagonal lattice covered by a circular disk of diameter n if the center of the circle is chosen such that the disk covers the maximum possible number of lattice points.

Original entry on oeis.org

2, 7, 10, 19, 24, 37, 48, 61, 77, 94, 115, 134, 157, 187, 208, 241, 265, 301, 330, 367, 406, 444, 486, 527, 572, 617, 665, 721, 769, 825, 877, 935, 993, 1054, 1117, 1182, 1249, 1316, 1385, 1459, 1531, 1615, 1684, 1765, 1842, 1925, 2011, 2096, 2187, 2276
Offset: 1

Views

Author

Hugo Pfoertner, Jan 07 2007, Feb 11 2007

Keywords

Comments

a(n)>=max(A053416(n),A053479(n),A053417(n)). a(n) is an upper bound for the number of segments of a self avoiding path on the 2-dimensional triangular lattice such that the path fits into a circle of diameter n. A122226(n)<=a(n).

Crossrefs

Cf. A053416, A053479, A053417, A125851, A122226. The corresponding sequences for the square lattice and the honeycomb net are A123690 and A127406, respectively.

Extensions

More terms copied from b-file by Hagen von Eitzen, Jun 17 2009

A127405 Number of points in a 2-dimensional honeycomb net covered by a circular disk of diameter n if the center of the disk is chosen to minimize the number of net points covered by the disk.

Original entry on oeis.org

0, 2, 4, 8, 12, 20, 24, 36, 46, 56, 68, 81, 96, 116, 130, 150, 168, 190, 204, 236
Offset: 1

Views

Author

Hugo Pfoertner, Feb 08 2007

Keywords

Comments

a(n)<= min(A127402(n),A127403(n),A127404(n)).

Crossrefs

Cf. A127402, A127403, A127404, A127406. The corresponding sequences for the square lattice and hexagonal lattice are A123689 and A125851, respectively.

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 *)
Showing 1-6 of 6 results.