OFFSET
1,3
COMMENTS
Rotating the square by 45 degrees (so that its vertices lie on the coordinate axes) results in sequence A303644 instead.
LINKS
Kirill Ustyantsev, Graphic illustration
PROG
(Python)
import math
for n in range (1, 100):
sqn = math.ceil(math.sqrt(2)*n)
count = 0
for x in range(-sqn, sqn):
for y in range(-sqn, sqn):
if (x*x+y*y>n*n and abs(x)+abs(y)<n*math.sqrt(2)):
count += 1
print(count)
(PARI) a(n) = sum(x=-2*n, 2*n, sum(y=-2*n, 2*n, ((x^2+y^2) > n^2) && ((abs(x)+abs(y))^2 < 2*n^2))); \\ Michel Marcus, May 22 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Kirill Ustyantsev, Apr 27 2018
STATUS
approved