OFFSET
0,8
COMMENTS
To build the curve:
- start from the origin looking to the right,
- for k = 0, 1, ...:
- move forward to the next lattice point,
- if A014577(n) = 1 then turn 90 degrees to the left
otherwise turn 90 degrees to the right.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..8192
Rémy Sigrist, Colored representation of the first 2^18 points
Eric Weisstein's World of Mathematics, Dragon Curve
Wikipedia, Dragon curve
FORMULA
For any k >= 0:
- a(2^(4*k)) = (-4)^k,
- a(2^(4*k+1)) = (-4)^k,
- a(2^(4*k+2)) = 0,
- a(2^(4*k+3)) = -2*(-4)^k.
MATHEMATICA
Re[Join[{0}, Accumulate[Nest[Join[#, Reverse[I #]] &, {1}, 7]]]] (* Vladimir Reshetnikov, Apr 14 2022 *)
PROG
CROSSREFS
KEYWORD
AUTHOR
Rémy Sigrist, Feb 10 2020
STATUS
approved