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.

A323624 The diagonal 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 A323624 #12 Feb 15 2019 14:58:06
%S A323624 0,2,5,10,16,22,32,40,50,62,73,88,101,118,134,152,170,189,210,230,253,
%T A323624 275,299,325,351,381,406,435,465,495,527,561,593,628,663,699,737,775,
%U A323624 813,853,895,935,981,1021,1068,1113,1156,1205,1253,1302,1352,1401,1454,1502,1557,1609,1664,1723
%N A323624 The diagonal of the order of square grid cells touched by a circle expanding from the middle of a cell.
%C A323624 Related to, but not the same as the case with the circle centered at the corner of a cell, see A232499.
%H A323624 Rok Cestnik, <a href="/A323621/a323621_1.gif">Visualization</a>
%o A323624 (Python)
%o A323624 N = 12
%o A323624 from math import sqrt
%o A323624 # the distance to the edge of each cell
%o A323624 edges = [[-1 for j in range(N)] for i in range(N)]
%o A323624 edges[0][0] = 0
%o A323624 for i in range(1,N):
%o A323624     edges[i][0] = i-0.5
%o A323624     edges[0][i] = i-0.5
%o A323624 for i in range(1,N):
%o A323624     for j in range(1,N):
%o A323624         edges[i][j] = sqrt((i-0.5)**2+(j-0.5)**2)
%o A323624 # the values of the distances
%o A323624 values = []
%o A323624 for i in range(N):
%o A323624     for j in range(N):
%o A323624         values.append(edges[i][j])
%o A323624 values = list(set(values))
%o A323624 values.sort()
%o A323624 # the cell order
%o A323624 board = [[-1 for j in range(N)] for i in range(N)]
%o A323624 count = 0
%o A323624 for v in values:
%o A323624     for i in range(N):
%o A323624         for j in range(N):
%o A323624             if(edges[i][j] == v):
%o A323624                 board[i][j] = count
%o A323624     count += 1
%o A323624 # print out the sequence
%o A323624 for i in range(N):
%o A323624     print(str(board[i][i])+",", end="")
%Y A323624 For the grid read by antidiagonals see A323621.
%Y A323624 For the first row of the grid see A323622.
%Y A323624 For the second row of the grid see A323623.
%Y A323624 For the (2,1) diagonal of the grid see A323625.
%Y A323624 Cf. A232499.
%K A323624 nonn
%O A323624 0,2
%A A323624 _Rok Cestnik_, Jan 20 2019