OFFSET
0,3
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
LINKS
FORMULA
a(n)/(n/2)^2 -> Pi*2/sqrt(3).
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 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Jan 14 2000
EXTENSIONS
Edited by N. J. A. Sloane, Jul 03 2008 at the suggestion of R. J. Mathar
STATUS
approved