login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 2
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, 22, 26, 12, 18, 21, 27, 33, 39, 45, 47, 49, 53, 55, 59, 61, 65, 67, 71, 73, 77, 28, 32, 34, 38, 40, 44, 46, 24, 30, 36, 42, 48, 50, 51, 57, 63, 69, 75, 79, 83, 85 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
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).
Apparently this sequence is a permutation of the natural number with infinitely many fixed points.
LINKS
Rémy Sigrist, Colored representation of (a(n)-n) restricted to -500 <= x <= +500 and -500 <= y <= +500 (where black pixels correspond to zeros, blue shades correspond to negative values and red shades correspond to positive values)
EXAMPLE
The spiral begins:
111--105---99---93---87---86---84---82---81---80---78
| |
117 79---75---69---63---57---51---50---48---42 72
| | | |
119 83 49---47---45---39---33---27---21 36 66
| | | | | |
121 85 53 25---23---19---15----9 18 30 60
| | | | | | | |
125 89 55 29 7----5----3 6 12 24 54
| | | | | | | | | |
127 91 59 31 11 1----2 10 26 46 76
| | | | | | | | |
131 95 61 35 13---17----4----8 22 44 74
| | | | | | |
133 97 65 37---41---43---14---16---20 40 70
| | | | |
137 101 67---71---73---77---28---32---34---38 68
| | |
139 103--107--109--113--115---52---56---58---62---64
|
143--145--149--151--155--157---88---92---94---98--100
PROG
(PARI) See Links section.
CROSSREFS
Sequence in context: A020625 A033633 A242119 * A338938 A249823 A171049
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Jun 02 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 07:07 EDT 2024. Contains 371964 sequences. (Running on oeis4.)