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 A053458 #15 Sep 05 2023 15:25:59 %S A053458 0,1,1,7,13,19,31,43,55,73,85,109,121,151,169,199,235,253,295,313,361, %T A053458 397,433,475,511,571,595,661,703,757,817,859,925,979,1039,1111,1159, %U A053458 1237,1285,1381,1453,1519,1597,1663,1759,1813,1915,1993,2077,2173,2257 %N A053458 Open disk numbers (version 3): a(n) is the number of points (i+j/2,j*sqrt(3)/2), i,j integers (triangular grid) contained in an open disk of diameter n, centered at (0,0). %C A053458 a(n)/(n/2)^2 --> Pi*2/sqrt(3) (see A186706). %p A053458 A053458 := proc(d) %p A053458 local a,j,imin,imax ; %p A053458 a := 0 ; %p A053458 for j from -floor(d/sqrt(3)) do %p A053458 if j^2*3 >= d^2 and j>= 0 then %p A053458 break ; %p A053458 end if; %p A053458 imin := (-j-sqrt(d^2-3*j^2))/2 ; %p A053458 if type(imin,integer) then %p A053458 imin := imin+1 ; %p A053458 else %p A053458 imin := ceil(imin) ; %p A053458 end if; %p A053458 imax := (-j+sqrt(d^2-3*j^2))/2 ; %p A053458 if type(imax,integer) then %p A053458 imax := imax -1 ; %p A053458 else %p A053458 imax := floor(imax) ; %p A053458 end if; %p A053458 a := a+imax-imin+1 ; %p A053458 end do: %p A053458 a ; %p A053458 end proc: %p A053458 seq(A053458(d),d=0..30) ; # _R. J. Mathar_, Nov 22 2022 %t A053458 a[n_] := Sum[Boole[4*(i^2 + i*j + j^2) < n^2], {i, -n, n}, {j, -n, n}]; %t A053458 Table[a[n], {n, 0, 100}] (* _Jean-François Alcover_, Sep 05 2023 *) %Y A053458 Cf. A053416 (closed disk), A053456, A053457, A053459. %Y A053458 Cf. A186706. %K A053458 easy,nonn %O A053458 0,4 %A A053458 Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Jan 13 2000