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.

A274917 Square spiral in which each new term is the least positive integer distinct from its (already assigned) eight neighbors.

This page as a plain text file.
%I A274917 #65 Mar 07 2020 13:50:20
%S A274917 1,2,3,4,2,3,2,4,3,1,4,1,2,5,1,3,1,4,1,4,1,3,1,2,4,2,3,2,3,4,1,3,4,2,
%T A274917 4,2,3,5,2,3,2,3,2,4,2,4,3,1,3,1,4,1,4,1,2,3,2,4,2,1,3,1,5,1,2,4,1,4,
%U A274917 1,4,1,4,1,3,1,3,1,2,4,2,4,2,3,2,3,2,3,4,1,4,1,3,1,3,4,2,4,2,3,4,1,3,5,2,3
%N A274917 Square spiral in which each new term is the least positive integer distinct from its (already assigned) eight neighbors.
%C A274917 The largest element is 5 and it is also the element with lower density in the spiral.
%C A274917 See A275609 for proof that 5 is maximal and for further comments. - _N. J. A. Sloane_, Mar 24 2019
%H A274917 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.
%F A274917 a(n) = A275609(n) + 1. - _Omar E. Pol_, Nov 14 2016
%e A274917 Illustration of initial terms as a spiral (n = 0..168):
%e A274917 .
%e A274917 .     2 - 3 - 2 - 1 - 5 - 1 - 3 - 1 - 2 - 4 - 2 - 4 - 2
%e A274917 .     |                                               |
%e A274917 .     4   1 - 4 - 3 - 2 - 4 - 2 - 4 - 3 - 1 - 3 - 1   3
%e A274917 .     |   |                                       |   |
%e A274917 .     2   3   2 - 1 - 5 - 1 - 3 - 1 - 2 - 4 - 2   4   2
%e A274917 .     |   |   |                               |   |   |
%e A274917 .     1   5   4   3 - 2 - 4 - 2 - 4 - 3 - 1   3   1   3
%e A274917 .     |   |   |   |                       |   |   |   |
%e A274917 .     4   2   1   5   1 - 3 - 1 - 5 - 2   4   2   4   2
%e A274917 .     |   |   |   |   |               |   |   |   |   |
%e A274917 .     1   3   4   2   4   2 - 4 - 3   1   3   1   3   1
%e A274917 .     |   |   |   |   |   |       |   |   |   |   |   |
%e A274917 .     4   2   1   3   1   3   1 - 2   4   2   4   2   4
%e A274917 .     |   |   |   |   |   |           |   |   |   |   |
%e A274917 .     1   3   4   2   4   2 - 4 - 3 - 1   3   1   3   1
%e A274917 .     |   |   |   |   |                   |   |   |   |
%e A274917 .     4   2   1   3   1 - 3 - 1 - 2 - 4 - 2   4   2   4
%e A274917 .     |   |   |   |                           |   |   |
%e A274917 .     1   3   4   2 - 4 - 2 - 4 - 3 - 1 - 3 - 1   3   1
%e A274917 .     |   |   |                                   |   |
%e A274917 .     4   2   1 - 3 - 1 - 3 - 1 - 2 - 4 - 2 - 4 - 2   4
%e A274917 .     |   |                                           |
%e A274917 .     1   3 - 4 - 2 - 4 - 2 - 4 - 3 - 1 - 3 - 1 - 3 - 1
%e A274917 .     |
%e A274917 .     2 - 5 - 1 - 3 - 1 - 3 - 1 - 2 - 4 - 2 - 4 - 2 - 4
%e A274917 .
%e A274917 a(13) = 5 is the first "5" in the sequence and its four neighbors are 4 (southwest), 3 (south), 1 (southeast) and 2 (east) when a(13) is placed in the spiral.
%e A274917 a(157) = 5 is the 6th "5" in the sequence and it is also the first "5" that is below the NE-SW main diagonal of the spiral (see the second term in the last row of the above diagram).
%Y A274917 Cf. A274913, A274921, A275609, A278354 (number of neighbors).
%K A274917 nonn
%O A274917 0,2
%A A274917 _Omar E. Pol_, Jul 11 2016