This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A332383 #24 Feb 16 2025 08:33:59 %S A332383 0,1,1,0,0,-1,-1,-2,-2,-3,-3,-2,-2,-3,-3,-4,-4,-5,-5,-4,-4,-3,-3,-2, %T A332383 -2,-3,-3,-2,-2,-3,-3,-4,-4,-5,-5,-4,-4,-3,-3,-2,-2,-1,-1,-2,-2,-1,-1, %U A332383 0,0,-1,-1,0,0,1,1,2,2,1,1,2,2,1,1,0,0,-1,-1,0,0,1,1,2 %N A332383 a(n) is the X-coordinate of the n-th point of the dragon curve. Sequence A332384 gives Y-coordinates. %C A332383 To build the curve: %C A332383 - start from the origin looking to the right, %C A332383 - for k = 0, 1, ...: %C A332383 - move forward to the next lattice point, %C A332383 - if A014577(n) = 1 then turn 90 degrees to the left %C A332383 otherwise turn 90 degrees to the right. %H A332383 Rémy Sigrist, <a href="/A332383/b332383.txt">Table of n, a(n) for n = 0..8192</a> %H A332383 Rémy Sigrist, <a href="/A332383/a332383.png">Colored representation of the first 2^18 points</a> %H A332383 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/DragonCurve.html">Dragon Curve</a> %H A332383 Wikipedia, <a href="https://en.wikipedia.org/wiki/Dragon_curve">Dragon curve</a> %H A332383 <a href="/index/Con#coordinates_2D_curves">Index entries for sequences related to coordinates of 2D curves</a> %F A332383 For any k >= 0: %F A332383 - a(2^(4*k)) = (-4)^k, %F A332383 - a(2^(4*k+1)) = (-4)^k, %F A332383 - a(2^(4*k+2)) = 0, %F A332383 - a(2^(4*k+3)) = -2*(-4)^k. %t A332383 Re[Join[{0}, Accumulate[Nest[Join[#, Reverse[I #]] &, {1}, 7]]]] (* _Vladimir Reshetnikov_, Apr 14 2022 *) %o A332383 (PARI) A014577(n)=1/2*(1+(-1)^(1/2*((n+1)/2^valuation(n+1, 2)-1))) %o A332383 { z=0; d=1; for (n=0, 71, print1 (real(z) ", "); z += d; d*=if (A014577(n), +I, -I)) } %Y A332383 See A332251 for a similar sequence. %Y A332383 Cf. A014577, A332384 (Y-coordinates). %K A332383 sign,look,base %O A332383 0,8 %A A332383 _Rémy Sigrist_, Feb 10 2020