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!)
A277214 a(n) is the Manhattan distance between n and 1 in a 3-dimensional cubic spiral of positive integers with 1..8 at the center (illustration in the comments). 0
0, 1, 2, 1, 2, 3, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 5, 4, 5, 6, 5, 4, 5, 4, 3, 2, 3, 2, 3, 4, 3, 4, 5, 4, 3, 2, 3, 4, 3, 2, 3, 2, 1, 2, 1, 2, 3, 4, 3, 4, 5, 4, 3, 4, 3, 2, 3, 2, 3, 2, 3, 2, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Similar to A214526, but three-dimensional, and the core is 2 X 2 X 2 rather than 1 X 1.
The spiral begins as follows:
Level z=-2:
95 94 93 92 91 90
96 77 76 75 74 89
97 78 67 66 73 88
98 79 68 65 72 87
99 80 69 70 71 86
100 81 82 83 84 85
z=-1:
116 115 114 113 112 111
117 52 51 50 49 110
118 53 62 61 60 109
119 54 63 64 59 108
120 55 56 57 58 107
101 102 103 104 105 106
z=0:
137 136 135 134 133 132
138 39 38 37 48 131
139 40 3 2 47 130
140 41 4 1 46 129
121 42 43 44 45 128
122 123 124 125 126 127
z=1:
144 145 146 147 148 149
143 34 35 36 25 150
142 33 6 7 26 151
141 32 5 8 27 152
160 31 30 29 28 153
159 158 157 156 155 154
z=2:
165 166 167 168 169 170
164 21 22 23 24 171
163 20 11 12 13 172
162 19 10 9 14 173
161 18 17 16 15 174
180 179 178 177 176 175
z=3:
186 187 188 189 190 191
185 204 205 206 207 192
184 203 214 215 208 193
183 202 213 216 209 194
182 201 212 211 210 195
181 200 199 198 197 196
Algorithm sketch:
1. At every x-y plane the direction is clockwise if z > 0 and counterclockwise if z <= 0.
2. After an N*N cube is complete and we start building an M*M cube, M=N+2:
2a. The spiral at the first new edge of the M*M cube progresses from center to edges, in the same way as the A214526 spiral, e.g., z=-2 in the illustration.
2b. Between the first and last z-edges the spiral progresses according to item 1.
2c. The spiral at the last new edge of the M*M cube progresses from edges to center, e.g., z=3 in the illustration.
LINKS
FORMULA
abs( a(n) - a(n-1) ) = 1.
CROSSREFS
Cf. A214526.
Sequence in context: A043554 A005811 A008342 * A278603 A248218 A182110
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Oct 05 2016
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 23 05:37 EDT 2024. Contains 371906 sequences. (Running on oeis4.)