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.
%I A053416 #30 Nov 22 2022 10:46:47 %S A053416 1,1,7,7,19,19,37,43,61,73,91,109,127,151,187,199,241,253,301,313,367, %T A053416 397,439,475,517,571,613,661,721,757,823,859,931,979,1045,1111,1165, %U A053416 1237,1303,1381,1459,1519,1615,1663,1765,1813,1921,1993,2083,2173,2263 %N 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). %C A053416 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 %C A053416 Same as above but "number of disks (r = 1)" instead of "number of points". See illustration in links. - _Kival Ngaokrajang_, Apr 06 2014 %H A053416 H. v. Eitzen, <a href="/A053416/b053416.txt">Table of n, a(n) for n = 0..1000</a> %H A053416 Kival Ngaokrajang, <a href="/A053416/a053416_1.pdf">Illustration of initial terms</a> %H A053416 <a href="/index/Aa#A2">Index entries for sequences related to A2 = hexagonal = triangular lattice</a> %F A053416 a(n)/(n/2)^2->Pi*2/sqrt(3). %F A053416 a(n) >= A053458(n). - _R. J. Mathar_, Nov 22 2022 %F A053416 a(2*n) = A308685(n). - _R. J. Mathar_, Nov 22 2022 %p A053416 A053416 := proc(d) %p A053416 local a,j,imin,imax ; %p A053416 a := 0 ; %p A053416 for j from -floor(d/sqrt(3)) do %p A053416 if j^2*3 > d^2 and j> 0 then %p A053416 break ; %p A053416 end if; %p A053416 imin := ceil((-j-sqrt(d^2-3*j^2))/2) ; %p A053416 imax := floor((-j+sqrt(d^2-3*j^2))/2) ; %p A053416 a := a+imax-imin+1 ; %p A053416 end do: %p A053416 a ; %p A053416 end proc: %p A053416 seq(A053416(d),d=0..30) ; # _R. J. Mathar_, Nov 22 2022 %t A053416 a[n_] := Sum[Boole[4*(i^2 + i*j + j^2) <= n^2], {i, -n, n}, {j, -n, n}]; %t A053416 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 *) %Y A053416 Cf. A003215, A125849, A125850, A125851, A125852. %Y A053416 Cf. A053411, A053414, A053415, A053417, A053458 (open disk), A308685 (bisection). %K A053416 easy,nonn %O A053416 0,3 %A A053416 Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Jan 10 2000 %E A053416 Edited by _N. J. A. Sloane_, Jul 03 2008 at the suggestion of _R. J. Mathar_