login
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).
6
0, 1, 1, 7, 13, 19, 31, 43, 55, 73, 85, 109, 121, 151, 169, 199, 235, 253, 295, 313, 361, 397, 433, 475, 511, 571, 595, 661, 703, 757, 817, 859, 925, 979, 1039, 1111, 1159, 1237, 1285, 1381, 1453, 1519, 1597, 1663, 1759, 1813, 1915, 1993, 2077, 2173, 2257
OFFSET
0,4
COMMENTS
a(n)/(n/2)^2 --> Pi*2/sqrt(3) (see A186706).
MAPLE
A053458 := 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 := (-j-sqrt(d^2-3*j^2))/2 ;
if type(imin, integer) then
imin := imin+1 ;
else
imin := ceil(imin) ;
end if;
imax := (-j+sqrt(d^2-3*j^2))/2 ;
if type(imax, integer) then
imax := imax -1 ;
else
imax := floor(imax) ;
end if;
a := a+imax-imin+1 ;
end do:
a ;
end proc:
seq(A053458(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, Sep 05 2023 *)
CROSSREFS
Cf. A053416 (closed disk), A053456, A053457, A053459.
Cf. A186706.
Sequence in context: A091180 A272381 A242190 * A040058 A172057 A173176
KEYWORD
easy,nonn
AUTHOR
Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Jan 13 2000
STATUS
approved