OFFSET
1,2
LINKS
Kirill Ustyantsev, Table of n, a(n) for n = 1..1000
Kirill Ustyantsev, Illustration of this configuration for n=1..10
EXAMPLE
For n = 2 we have two lattice points between the defined circle and its inscribed equilateral triangle: (1, 1) and (1, -1).
PROG
(Python)
import math
tan=math.sqrt(3)/3
for n in range (1, 70):
.count=0
.count1=0
.for x in range (-n, n):
..for y in range (-n, n):
...if (x*x+y*y<n*n and y>-tan*x+tan*n):
....count=count+1
...if (x*x+y*y<n*n and y<-n/2):
....count1=count1+1
.print(2*count+count1)
(PARI) a(n) = sum(x=-n, +n, sum(y=-n, +n, ((x^2+y^2) < n^2) && ((2*x < - n) || (3*y^2 > (n-x)^2)))); \\ Michel Marcus, May 22 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Kirill Ustyantsev, Apr 28 2018
STATUS
approved