OFFSET
1,2
LINKS
Kirill Ustyantsev, Geometric illustration
EXAMPLE
For n = 2 we have 5 lattice points: (-1, 2); (-1, -2); (2, -1); (2, 1); (3, 0).
PROG
(Python)
import math
tan=math.sqrt(3)/3
for n in range (1, 71):
count=0
for x in range (-n, 2*n):
for y in range (-2*n, 2*n):
if (x*x+y*y>n*n and y<-tan*x+2*tan*n and y>tan*x-2*tan*n and x>-n):
count=count+1
print(count)
(PARI) a(n) = sum(x=-n+1, 2*n, sum(y=-2*n, 2*n, ((x^2+y^2) > n^2) && (3*y^2 < (x-2*n)^2))); \\ Michel Marcus, May 22 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Kirill Ustyantsev, Apr 29 2018
STATUS
approved