login
A389588
Number of integer lattice points (x,y) with x^2 + y^2 <= n^2 that lie outside the interior of the regular hexagon inscribed in the circle of radius n centered at the origin.
1
4, 4, 8, 8, 16, 16, 16, 38, 50, 62, 66, 66, 86, 94, 140, 144, 160, 172, 192, 212, 216, 240, 298, 310, 346, 366, 390, 402, 422, 512, 528, 564, 588, 620, 660, 664, 704, 794, 850, 882, 898, 934, 966, 1014, 1144, 1160, 1204, 1236, 1284, 1332, 1384, 1424, 1554, 1598, 1634, 1698, 1734, 1786, 1822, 1992, 2056, 2100, 2152, 2204
OFFSET
1,1
COMMENTS
The hexagon has flat-top orientation with vertices at (+-n,0), (+-n/2, +-sqrt(3)*n/2). Boundary points of the hexagon are included in the count. This sequence explores the geometric mismatch between the circular symmetry of the circle and the hexagonal symmetry on the integer lattice.
FORMULA
a(n) = A000328(n) - (number of lattice points strictly inside the inscribed hexagon).
a(n) = #{ (x,y) in Z^2 : x^2+y^2 <= n^2 and not( |y| < sqrt(3)*n/2 and |sqrt(3)*x+y| < sqrt(3)*n and |sqrt(3)*x-y| < sqrt(3)*n ) }.
a(n) = A000328(n) - I(n) where I(n) = 2*n - 2*m - 1 + 4 * Sum_{k=1..m} ceiling(n-k/sqrt(3)) with m=floor(sqrt(3)*n/2). - Sean A. Irvine, Oct 13 2025
EXAMPLE
For n=1:
Circle points: (0,0),(+-1,0),(0,+-1) -> 5 points.
Hexagon interior test uses inequalities (with sqrt(3) \approx 1.732):
|y| < 0.866, |sqrt(3)*x+y| < 1.732, |sqrt(3)*x-y| < 1.732.
Check:
(0,0): all satisfied -> inside hexagon -> not counted.
(1,0): |sqrt(3)*1+0|=1.732 not <1.732 -> counted.
(-1,0): |sqrt(3)*(-1)+0|=1.732 not <1.732 -> counted.
(0,1): |y|=1 not <0.866 -> outside -> counted.
(0,-1): |y|=1 not <0.866 -> outside -> counted.
Therefore 4 points remain: (+-1,0),(0,+-1). So a(1)=4.
For n=2:
Circle contains 13 lattice points. The hexagon interior contains 9 of them; only (+-2,0),(0,+-2) lie outside. So a(2)=4.
PROG
(MATLAB)
% a(n) = Number of integer lattice points (x, y) with x^2 + y^2 <= n^2
% that lie outside the interior of the inscribed regular hexagon
% (flat-top orientation). Hexagon boundary points are counted.
function val = a(n)
count = 0;
s3 = sqrt(3);
for x = -n:n
for y = -n:n
if x^2 + y^2 <= n^2
% Check if point lies in the strict interior of the hexagon
in_hex = (abs(y) < (s3/2)*n) && ...
(abs(s3*x + y) < s3*n) && ...
(abs(s3*x - y) < s3*n);
if ~in_hex
count = count + 1;
end
end
end
end
val = count;
end
% Example: generate first 30 terms
for n = 1:30
fprintf('%d ', a(n));
end
fprintf('\n');
CROSSREFS
Cf. A000328 (circle lattice points).
Sequence in context: A351838 A377783 A328527 * A378249 A145447 A204989
KEYWORD
nonn
AUTHOR
Safwan Jaradat, Oct 08 2025
STATUS
approved