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”).

The order of square grid cells touched by a circle expanding from the middle of a cell read by antidiagonals.
5

%I #12 Feb 15 2019 08:21:38

%S 0,1,1,3,2,3,6,4,4,6,9,7,5,7,9,13,10,8,8,10,13,18,14,11,10,11,14,18,

%T 23,19,15,12,12,15,19,23,29,24,20,17,16,17,20,24,29,35,30,25,21,20,20,

%U 21,25,30,35,42,36,31,26,24,22,24,26,31,36,42,48,43,37,33,28,27,27,28,33,37,43,48,57,49,44,39,34,33,32,33,34,39,44,49,57

%N The order of square grid cells touched by a circle expanding from the middle of a cell read by antidiagonals.

%C Related to, but not the same as the case with the circle centered at the corner of a cell, see A232499.

%H Rok Cestnik, <a href="/A323621/a323621_1.gif">Visualization</a>

%o (Python)

%o N = 8

%o from math import sqrt

%o # the distance to the edge of each cell

%o edges = [[-1 for j in range(N)] for i in range(N)]

%o edges[0][0] = 0

%o for i in range(1,N):

%o edges[i][0] = i-0.5

%o edges[0][i] = i-0.5

%o for i in range(1,N):

%o for j in range(1,N):

%o edges[i][j] = sqrt((i-0.5)**2+(j-0.5)**2)

%o # the values of the distances

%o values = []

%o for i in range(N):

%o for j in range(N):

%o values.append(edges[i][j])

%o values = list(set(values))

%o values.sort()

%o # the cell order

%o board = [[-1 for j in range(N)] for i in range(N)]

%o count = 0

%o for v in values:

%o for i in range(N):

%o for j in range(N):

%o if(edges[i][j] == v):

%o board[i][j] = count

%o count += 1

%o # print out the sequence

%o for i in range(N):

%o for j in range(i+1):

%o print(str(board[j][i-j])+" ", end="")

%Y For the first row of the grid see A323622.

%Y For the second row of the grid see A323623.

%Y For the diagonal of the grid see A323624.

%Y For the (2,1) diagonal of the grid see A323625.

%Y Cf. A232499.

%K nonn

%O 0,4

%A _Rok Cestnik_, Jan 20 2019