%I #25 Sep 11 2020 11:46:50
%S 0,1,2,2,1,0,0,1,2,2,2,2,1,1,1,0,0,0,0,1,2,2,1,0,0,1,2,3,3,3,4,4,4,5,
%T 5,5,5,4,3,3,4,5,5,4,3,3,3,3,4,4,4,5,5,5,6,7,8,8,7,6,6,7,8,8,8,8,7,7,
%U 7,6,6,6,6,7,8,8,7,6,6,7,8,8,8,8,7,7,7
%N a(n) is the X-coordinate of the n-th point of a variation on Wunderlich's serpentine type 010 101 010 curve (starting at the origin and occupying the first quadrant).
%C The first type of Wunderlich curve is a plane-filling curve. Hence for any x >= 0 and y >= 0, there is a unique n > 0 such that a(n) = x and A323259(n) = y.
%C This curve form is by Robert Dickau. The curve begins with a 3x3 block of 9 points in an "S" shape. This block is replicated 9 times in an "N" pattern with rotations so the block ends are unit steps apart. The new bigger block is then likewise replicated in an N pattern, and so on. Wunderlich (see section 4 figure 3) begins instead with an N shape 3x3 block, so the curve here is the same large-scale structure but opposite 3x3 blocks throughout. - _Kevin Ryde_, Sep 08 2020
%H Rémy Sigrist, <a href="/A323258/b323258.txt">Table of n, a(n) for n = 1..6561</a>
%H Robert Dickau, <a href="http://robertdickau.com/wunderlich.html">Wunderlich Curves</a>
%H Rémy Sigrist, <a href="/A323258/a323258.png">Illustration of initial terms</a>
%H Wolfram Demonstrations Project, <a href="https://demonstrations.wolfram.com/WunderlichCurves/">Wunderlich Curves</a>
%H Walter Wunderlich, <a href="http://sodwana.uni-ak.ac.at/geom/mitarbeiter/wallner/wunderlich/pdf/125.pdf">Über Peano-Kurven</a>, Elemente der Mathematik, volume 28, number 1, 1973, pages 1-10.
%H <a href="/index/Con#coordinates_2D_curves">Index entries for sequences related to coordinates of 2D curves</a>
%o (PARI) s = [0, 1, 2, 2+I, 1+I, I, 2*I, 1+2*I, 2+2*I];
%o w = apply(z -> imag(z) + I*real(z), s);
%o r = [0, 1, 0, 3, 2, 3, 0, 1, 0]
%o a(n) = {
%o my (d=if (n>1, Vecrev(digits(n-1, 9)), [0]), z=s[1+d[1]]);
%o for (i=2, #d,
%o my (c=(3^(i-1)-1)/2*(1+I));
%o z = 3^(i-1) * w[1+d[i]] + c + (z-c) * I^r[1+d[i]];
%o );
%o return (real(z));
%o }
%Y See A323259 for the Y-coordinate.
%Y See A163528 for a similar sequence.
%K nonn
%O 1,3
%A _Rémy Sigrist_, Jan 09 2019