login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A323623
The second row of the order of square grid cells touched by a circle expanding from the middle of a cell.
4
1, 2, 4, 7, 10, 14, 19, 24, 30, 36, 43, 49, 58, 66, 75, 85, 95, 105, 116, 128, 139, 152, 164, 178, 193, 206, 222, 236, 251, 268, 285, 302, 318, 338, 357, 377, 395, 416, 437, 457, 478, 501, 522, 547, 569, 591, 617, 641, 667, 691, 717, 746, 771, 799, 827, 856, 885, 914, 943, 974, 1004, 1034, 1067
OFFSET
0,2
COMMENTS
Related to, but not the same as the case with the circle centered at the corner of a cell, see A232499.
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][1])+" ", end="")
CROSSREFS
For the grid read by antidiagonals see A323621.
For the first row of the grid see A323622.
For the diagonal of the grid see A323624.
For the (2,1) diagonal of the grid see A323625.
Cf. A232499.
Sequence in context: A145106 A127723 A076268 * A055607 A024512 A047808
KEYWORD
nonn
AUTHOR
Rok Cestnik, Jan 20 2019
STATUS
approved