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.

A274641 Counterclockwise square spiral constructed by greedy algorithm, so that each row, column, and diagonal contains distinct numbers. Start with 0 (so in this version a(n) = A274640(n) - 1).

This page as a plain text file.
%I A274641 #41 Aug 16 2020 12:41:36
%S A274641 0,1,2,3,1,2,3,4,5,0,3,5,1,0,5,4,2,0,4,1,5,0,1,3,4,2,6,7,4,3,8,6,7,2,
%T A274641 9,10,3,6,7,5,2,8,4,6,7,8,9,10,11,5,7,8,10,9,11,12,6,5,9,8,11,12,13,
%U A274641 14,7,1,8,11,6,9,10,12,13,9,8,5,12,4,2,14,15,6,0,9,12,11,13,10,14,2,7,4,0,11,10,13,6,3,1,15,8,16,0,7,10
%N A274641 Counterclockwise square spiral constructed by greedy algorithm, so that each row, column, and diagonal contains distinct numbers. Start with 0 (so in this version a(n) = A274640(n) - 1).
%C A274641 See A274640 for further information.
%C A274641 Presumably every row, column, and diagonal is a permutation of the natural numbers, but is there a proof? - _N. J. A. Sloane_, Jul 10 2016
%H A274641 N. J. A. Sloane, <a href="/A274641/b274641.txt">Table of n, a(n) for n = 0..20000</a> [Based on Alois Heinz's b-file for A274640]
%H A274641 F. Michel Dekking, Jeffrey Shallit, and N. J. A. Sloane, <a href="https://www.combinatorics.org/ojs/index.php/eljc/article/view/v27i1p52/8039">Queens in exile: non-attacking queens on infinite chess boards</a>, Electronic J. Combin., 27:1 (2020), #P1.52.
%H A274641 Rémy Sigrist, <a href="/A274641/a274641.png">Colored representation of the spiral for -500 <= x, y <= 500</a>
%H A274641 N. J. A. Sloane, <a href="/A195264/a195264.pdf">Confessions of a Sequence Addict (AofA2017)</a>, slides of invited talk given at AofA 2017, Jun 19 2017, Princeton. Mentions this sequence.
%e A274641 From _Jon E. Schoenfield_, Dec 26 2016: (Start)
%e A274641 The spiral begins:
%e A274641 .
%e A274641    8--15---1---3---6--13--10--11---0---4---7
%e A274641    |                                       |
%e A274641   16   7--14--13--12--11---8---9---5---6   2
%e A274641    |   |                               |   |
%e A274641    0   1   3--10---9---2---7---6---8  12  14
%e A274641    |   |   |                       |   |   |
%e A274641    7   8   6   2---4---5---0---1   3  11  10
%e A274641    |   |   |   |               |   |   |   |
%e A274641   10  11   7   0   1---3---2   5   4   9  13
%e A274641    |   |   |   |   |       |   |   |   |   |
%e A274641   14   6   5   4   2   0---1   3   7  10  11
%e A274641    |   |   |   |   |           |   |   |   |
%e A274641   13   9   2   1   3---4---5---0   6   8  12
%e A274641    |   |   |   |                   |   |   |
%e A274641    6  10   8   5---0---1---3---4---2   7   9
%e A274641    |   |   |                           |   |
%e A274641    3  12   4---6---7---8---9--10--11---5   0
%e A274641    |   |                                   |
%e A274641   11  13---9---8---5--12---4---2--14--15---6
%e A274641    |
%e A274641    9--14---0--11--15---7--13--12--10--17--16
%e A274641 .
%e A274641 (End)
%Y A274641 Cf. A274640 (if start with 1 at center), A324481 (position of first n).
%Y A274641 For the eight spokes see A324774-A324781.
%K A274641 nonn
%O A274641 0,3
%A A274641 _N. J. A. Sloane_, Jul 09 2016, based on the entry A274640 from _Zak Seidov_ and _Kerry Mitchell_, Jun 30 2016