login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A334576
a(n) is the X-coordinate of the n-th point of the space filling curve P defined in Comments section; sequence A334577 gives Y-coordinates.
2
0, 1, 2, 2, 2, 3, 3, 3, 4, 5, 6, 6, 5, 4, 4, 4, 4, 5, 6, 6, 6, 7, 7, 7, 7, 6, 5, 5, 6, 7, 7, 7, 8, 9, 10, 10, 10, 11, 11, 11, 12, 13, 14, 14, 13, 12, 12, 12, 11, 10, 9, 9, 9, 8, 8, 8, 8, 9, 10, 10, 9, 8, 8, 8, 8, 9, 10, 10, 10, 11, 11, 11, 12, 13, 14, 14, 13
OFFSET
0,3
COMMENTS
The space filling curve P corresponds to the midpoint curve of the alternate paperfolding curve and can be built as follows:
- we define the family {P_k, k > 0}:
- P_1 corresponds to the points (0, 0), (1, 0), (2, 0) and (2, 1), in that order:
+
|
|
+----+----+
O
- for any k > 0, P_{n+1} is built from four copies of P_n as follows:
+
|A
+ |
C| +----+ |
A B| ---> |C B| |B C
+-------+ + | +----+-+
O C| | C|
A B| A| A B|
+-------+ +-+-------+
O
- the space filling curve P is the limit of P_k as k tends to infinity.
We can also describe the space filling curve P by mean of an L-system (see Links section).
LINKS
Robert Ferréol (MathCurve), Courbe de Polya [in French]
Rémy Sigrist, Colored line plot of the first 2^14 points of the space filling curve P (where the hue is function of the number of steps from the origin)
Rémy Sigrist, Colored scatterplot of the first 2^20 points of the space filling curve P (where the hue is function of the number of steps from the origin)
FORMULA
a(n+1) = (A020986(n) + A020986(n+1) - 1)/2 for any n >= 0.
EXAMPLE
The first points of the space filling curve P are as follows:
6| 20...21
| | |
5| 19 22
| | |
4| 16...17...18 23
| | |
3| 15 26...25...24
| | |
2| 4....5 14 27...28...29
| | | | |
1| 3 6 13...12...11 30
| | | | |
0| 0....1....2 7....8....9....10 31..
|
---+----------------------------------------
y/x| 0 1 2 3 4 5 6 7
- hence a(9) = a(12) = a(17) = a(26) = a(27) = 5.
PROG
(PARI) See Links section.
CROSSREFS
Sequence in context: A140471 A029061 A337206 * A081607 A029060 A184258
KEYWORD
nonn
AUTHOR
Rémy Sigrist, May 06 2020
STATUS
approved