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))).
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
Links
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
Comments