OFFSET
0,3
COMMENTS
Related to, but not the same as the case with the circle centered at the corner of a cell, see A232499.
LINKS
Rok Cestnik, Visualization
PROG
(Python)
N = 12
from math import sqrt
# the distance to the edge of each cell
edges = [[-1 for j in range(N)] for i in range(N)]
edges[0][0] = 0
for i in range(1, N):
edges[i][0] = i-0.5
edges[0][i] = i-0.5
for i in range(1, N):
for j in range(1, N):
edges[i][j] = sqrt((i-0.5)**2+(j-0.5)**2)
# the values of the distances
values = []
for i in range(N):
for j in range(N):
values.append(edges[i][j])
values = list(set(values))
values.sort()
# the cell order
board = [[-1 for j in range(N)] for i in range(N)]
count = 0
for v in values:
for i in range(N):
for j in range(N):
if(edges[i][j] == v):
board[i][j] = count
count += 1
# print out the sequence
for i in range(N):
print(str(board[i][0])+" ", end="")
CROSSREFS
KEYWORD
nonn
AUTHOR
Rok Cestnik, Jan 20 2019
STATUS
approved