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.
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
Offset: 1
Keywords
Examples
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
Links
- Rémy Sigrist, Representation of S_2 restricted to -500 <= x <= +500 and -500 <= y <= +500
- Rémy Sigrist, Representation of S_3 restricted to -500 <= x <= +500 and -500 <= y <= +500
- 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)
- Rémy Sigrist, PARI program for A308505
Programs
-
PARI
See Links section.
Comments