A334221 a(n) is the Y-coordinate of the point at n steps forward from the origin along the space filling curve U defined in A334188; sequence A334220 gives X-coordinates.
0, 0, 0, 0, 1, 2, 2, 1, 0, 0, 0, 0, 1, 2, 3, 3, 2, 1, 1, 2, 3, 4, 4, 4, 5, 6, 6, 5, 4, 4, 4, 3, 2, 1, 1, 2, 3, 3, 2, 1, 0, 0, 0, 0, 1, 2, 2, 1, 0, 0, 0, 0, 1, 2, 3, 3, 2, 1, 1, 2, 3, 4, 4, 4, 5, 6, 7, 7, 6, 5, 5, 6, 7, 7, 6, 5, 4, 3, 3, 4, 5, 6, 7, 7, 6, 5, 5
Offset: 0
Examples
The "forward" branch of curve U starting from the origin is as follows: | 6| 25.. | | 5| 24 | | 4| 21...22...23 | | 3| 20 15...14 | | | | 2| 5....6 19 16 13 | | | | | | 1| 4 7 18...17 12 | | | | 0| 0....1....2....3 8....9...10...11 ---+---------------------------------------- y/x| 0 1 2 3 4 5 6 7 - hence a(5) = a(6) = a(13) = a(16) = a(19) = 2.
Links
- Rémy Sigrist, Table of n, a(n) for n = 0..8066
- Rémy Sigrist, PARI program for A334221
- Index entries for sequences related to coordinates of 2D curves
Programs
-
PARI
See Links section.