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 A053479 #15 Aug 28 2016 18:23:40 %S A053479 0,0,3,6,12,21,30,42,54,69,90,102,129,150,174,198,225,258,288,327,354, %T A053479 396,435,471,522,558,609,654,702,759,807,864,924,981,1038,1104,1173, %U A053479 1230,1308,1368,1443,1512,1590,1671,1746,1830,1908,2001,2076,2166,2265 %N 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))). %C A053479 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 %C A053479 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 %H A053479 H. v. Eitzen, <a href="/A053479/b053479.txt">Table of n, a(n) for n = 0..1000</a> %H A053479 <a href="/index/Aa#A2">Index entries for sequences related to A2 = hexagonal = triangular lattice</a> %F A053479 a(n)/(n/2)^2 -> Pi*2/sqrt(3). %p A053479 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 %t A053479 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 *) %Y A053479 Cf. A053411, A053414, A053415, A053416, A053417. %Y A053479 Cf. A005882, A125850, A125851, A125852. %K A053479 easy,nonn %O A053479 0,3 %A A053479 Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Jan 14 2000 %E A053479 Edited by _N. J. A. Sloane_, Jul 03 2008 at the suggestion of _R. J. Mathar_