%I #23 Jul 15 2023 06:30:51
%S 1,4,12,17,33,42,64,77,105,122,158,177,219,242,292,319,375,406,470,
%T 503,573,610,688,729,813,856,948,995,1093,1144,1248,1303,1415,1472,
%U 1592,1653,1779,1844,1976,2045,2185,2256,2402,2477,2631,2710,2870,2951,3119,3204,3378,3467,3649
%N a(n) is the number of points with integer coordinates that are inside an equilateral triangle inscribed in a circle of radius n, the location of the triangle in the Oxy coordinate plane is described in the comments.
%C An equilateral triangle is located in the coordinate plane Oxy so that its center coincides with the origin O, one of the vertices lies on the Oy axis.
%H Nicolay Avilov, <a href="/A362873/a362873.jpg">Illustration of initial terms</a>
%F a(n) = (3*n - 2)/2 + 2*Sum_{k=1..floor(sqrt(3)*n/2)} floor(-sqrt(3)*k + 3*n/2) if n is even;
%F a(n) = (3*n - 1)/2 + 2*Sum_{k=1..floor(sqrt(3)*n/2)} floor(-sqrt(3)*k + (3*n + 1)/2) if n is odd.
%e a(3) = 4 + 2*4 = 12;
%e a(4) = 5 + 2*6 = 17.
%t a[n_]:=(3n-2+Mod[n,2])/2+2Sum[Floor[(3n+Mod[n,2])/2-Sqrt[3]k],{k,Floor[Sqrt[3]n/2]}]; Array[a,53] (* _Stefano Spezia_, May 08 2023 *)
%Y Cf. A194106, A183143.
%K nonn
%O 1,2
%A _Nicolay Avilov_, May 07 2023