%I #16 May 09 2020 02:31:32
%S 0,0,0,1,2,2,1,0,0,0,0,1,1,1,2,3,4,4,4,5,6,6,5,4,3,3,3,2,2,2,1,0,0,0,
%T 0,1,2,2,1,0,0,0,0,1,1,1,2,3,3,3,3,2,1,1,2,3,4,4,4,5,5,5,6,7,8,8,8,9,
%U 10,10,9,8,8,8,8,9,9,9,10,11,12,12,12,13
%N a(n) is the Y-coordinate of the n-th point of the space filling curve P defined in Comments section; sequence A334576 gives X-coordinates.
%C The space filling curve P corresponds to the midpoint curve of the alternate paperfolding curve and can be built as follows:
%C - we define the family {P_k, k > 0}:
%C - P_1 corresponds to the points (0, 0), (1, 0), (2, 0) and (2, 1), in that order:
%C +
%C |
%C |
%C +----+----+
%C O
%C - for any k > 0, P_{n+1} is built from four copies of P_n as follows:
%C +
%C |A
%C + |
%C C| +----+ |
%C A B| ---> |C B| |B C
%C +-------+ + | +----+-+
%C O C| | C|
%C A B| A| A B|
%C +-------+ +-+-------+
%C O
%C - the space filling curve P is the limit of P_k as k tends to infinity.
%C We can also describe the space filling curve P by mean of an L-system (see Links section).
%H Rémy Sigrist, <a href="/A334577/b334577.txt">Table of n, a(n) for n = 0..4095</a>
%H Joerg Arndt, <a href="/A334576/a334576.pdf">L-system corresponding to P</a>
%H Kevin Ryde, <a href="https://user42.tuxfamily.org/alternate/index.html">Iterations of the Alternate Paperfolding Curve</a>
%H Rémy Sigrist, <a href="/A334577/a334577.gp.txt">PARI program for A334577</a>
%H <a href="/index/Con#coordinates_2D_curves">Index entries for sequences related to coordinates of 2D curves</a>
%F a(n+1) = (A020990(n) + A020990(n+1) - 1)/2 for any n >= 0.
%e The first points of the space filling curve P are as follows:
%e 6| 20...21
%e | | |
%e 5| 19 22
%e | | |
%e 4| 16...17...18 23
%e | | |
%e 3| 15 26...25...24
%e | | |
%e 2| 4....5 14 27...28...29
%e | | | | |
%e 1| 3 6 13...12...11 30
%e | | | | |
%e 0| 0....1....2 7....8....9....10 31..
%e |
%e ---+----------------------------------------
%e y/x| 0 1 2 3 4 5 6 7
%e - hence a(15) = a(24) = a(25) = a(26) = 3.
%o (PARI) See Links section.
%Y Cf. A020990, A334576.
%K nonn
%O 0,5
%A _Rémy Sigrist_, May 06 2020
|