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.

A308505 Counterclockwise square spiral of distinct positive integers constructed by greedy algorithm, such that for p = 2 and 3, every multiple of p (except p itself) is vertically or horizontally adjacent to a cell already holding a multiple of p.

This page as a plain text file.
%I A308505 #13 Jun 03 2019 09:14:38
%S A308505 1,2,3,5,7,11,13,17,4,8,10,6,9,15,19,23,25,29,31,35,37,41,43,14,16,20,
%T A308505 22,26,12,18,21,27,33,39,45,47,49,53,55,59,61,65,67,71,73,77,28,32,34,
%U A308505 38,40,44,46,24,30,36,42,48,50,51,57,63,69,75,79,83,85
%N A308505 Counterclockwise square spiral of distinct positive integers constructed by greedy algorithm, such that for p = 2 and 3, every multiple of p (except p itself) is vertically or horizontally adjacent to a cell already holding a multiple of p.
%C A308505 For p = 2 and 3, the set S_p of lattice points holding a multiple of p is connected with respect to von Neumann neighborhood and has interesting graphical features (see representation in Links section).
%C A308505 Apparently this sequence is a permutation of the natural number with infinitely many fixed points.
%H A308505 Rémy Sigrist, <a href="/A308505/a308505.png">Representation of S_2 restricted to -500 <= x <= +500 and -500 <= y <= +500</a>
%H A308505 Rémy Sigrist, <a href="/A308505/a308505_1.png">Representation of S_3 restricted to -500 <= x <= +500 and -500 <= y <= +500</a>
%H A308505 Rémy Sigrist, <a href="/A308505/a308505_2.png">Colored representation of (a(n)-n) restricted to -500 <= x <= +500 and -500 <= y <= +500</a> (where black pixels correspond to zeros, blue shades correspond to negative values and red shades correspond to positive values)
%H A308505 Rémy Sigrist, <a href="/A308505/a308505.gp.txt">PARI program for A308505</a>
%e A308505 The spiral begins:
%e A308505   111--105---99---93---87---86---84---82---81---80---78
%e A308505     |                                                 |
%e A308505   117   79---75---69---63---57---51---50---48---42   72
%e A308505     |    |                                       |    |
%e A308505   119   83   49---47---45---39---33---27---21   36   66
%e A308505     |    |    |                             |    |    |
%e A308505   121   85   53   25---23---19---15----9   18   30   60
%e A308505     |    |    |    |                   |    |    |    |
%e A308505   125   89   55   29    7----5----3    6   12   24   54
%e A308505     |    |    |    |    |         |    |    |    |    |
%e A308505   127   91   59   31   11    1----2   10   26   46   76
%e A308505     |    |    |    |    |              |    |    |    |
%e A308505   131   95   61   35   13---17----4----8   22   44   74
%e A308505     |    |    |    |                        |    |    |
%e A308505   133   97   65   37---41---43---14---16---20   40   70
%e A308505     |    |    |                                  |    |
%e A308505   137  101   67---71---73---77---28---32---34---38   68
%e A308505     |    |                                            |
%e A308505   139  103--107--109--113--115---52---56---58---62---64
%e A308505     |
%e A308505   143--145--149--151--155--157---88---92---94---98--100
%o A308505 (PARI) See Links section.
%Y A308505 Cf. A005843, A008585.
%K A308505 nonn
%O A308505 1,2
%A A308505 _Rémy Sigrist_, Jun 02 2019