cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A323623 The second row of the order of square grid cells touched by a circle expanding from the middle of a cell.

This page as a plain text file.
%I A323623 #11 Feb 15 2019 14:58:35
%S A323623 1,2,4,7,10,14,19,24,30,36,43,49,58,66,75,85,95,105,116,128,139,152,
%T A323623 164,178,193,206,222,236,251,268,285,302,318,338,357,377,395,416,437,
%U A323623 457,478,501,522,547,569,591,617,641,667,691,717,746,771,799,827,856,885,914,943,974,1004,1034,1067
%N A323623 The second row of the order of square grid cells touched by a circle expanding from the middle of a cell.
%C A323623 Related to, but not the same as the case with the circle centered at the corner of a cell, see A232499.
%H A323623 Rok Cestnik, <a href="/A323621/a323621_1.gif">Visualization</a>
%o A323623 (Python)
%o A323623 N = 12
%o A323623 from math import sqrt
%o A323623 # the distance to the edge of each cell
%o A323623 edges = [[-1 for j in range(N)] for i in range(N)]
%o A323623 edges[0][0] = 0
%o A323623 for i in range(1,N):
%o A323623     edges[i][0] = i-0.5
%o A323623     edges[0][i] = i-0.5
%o A323623 for i in range(1,N):
%o A323623     for j in range(1,N):
%o A323623         edges[i][j] = sqrt((i-0.5)**2+(j-0.5)**2)
%o A323623 # the values of the distances
%o A323623 values = []
%o A323623 for i in range(N):
%o A323623     for j in range(N):
%o A323623         values.append(edges[i][j])
%o A323623 values = list(set(values))
%o A323623 values.sort()
%o A323623 # the cell order
%o A323623 board = [[-1 for j in range(N)] for i in range(N)]
%o A323623 count = 0
%o A323623 for v in values:
%o A323623     for i in range(N):
%o A323623         for j in range(N):
%o A323623             if(edges[i][j] == v):
%o A323623                 board[i][j] = count
%o A323623     count += 1
%o A323623 # print out the sequence
%o A323623 for i in range(N):
%o A323623     print(str(board[i][1])+" ", end="")
%Y A323623 For the grid read by antidiagonals see A323621.
%Y A323623 For the first row of the grid see A323622.
%Y A323623 For the diagonal of the grid see A323624.
%Y A323623 For the (2,1) diagonal of the grid see A323625.
%Y A323623 Cf. A232499.
%K A323623 nonn
%O A323623 0,2
%A A323623 _Rok Cestnik_, Jan 20 2019