login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A337004 Turn sequence of the R5 dragon curve. 2
1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, -1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1
COMMENTS
The R5 dragon curve is a segment replacement where each segment expands to
-1 4---E
|
-1 3---2 +1
|
S---1 +1
S and E are the start and end points of the existing segment. New points 1,2,3,4 are inserted between them. The new turns are +1,+1, -1,-1, where +1 is left and -1 is right. The directions of the first and last segments mean existing turns at S and E are unchanged.
Existing: + + - ...
Additional: ++-- ++-- ++-- ++-- ...
The curve is drawn by a unit step forward, turn left a(1)*90 degrees, another unit step forward, turn left a(2)*90 degrees, and so on. (The same way as Joerg Arndt in A175337.)
It's convenient to number points in the curve starting n=0 at the origin, so an expansion level is points 0 to 5^k inclusive. The first turn is then at n=1. The new turns on each expansion are at n == 1,2,3,4 (mod 5) and the existing turns become n == 0 (mod 5). So a(n) is determined by removing base 5 low 0 digits until reaching a digit 1,2,3,4 (formula below).
The segment expansion is symmetric in 180-degree rotation. Or equivalently the new turns +1,+1, -1,-1 are unchanged by flip +1 <-> -1 and read last to first. This means expansions can equally well be considered as unfoldings in the manner of Dekking's folding product (DDUU)*. Each "downward" fold D is +1 and each "upward" fold U is -1.
LINKS
Joerg Arndt, Matters Computational (The Fxtbook), section 1.31.5 pages 95-100.
Béla Bollobás, The Art of Mathematics: Coffee Time in Memphis, Cambridge University Press, 2006, section 95, pages 226-228. Signs + + - - etc. are the present sequence. See A170823 for scanned annotated pages.
F. M. Dekking, Paperfolding Morphisms, Planefilling Curves, and Fractal Tiles, Theoretical Computer Science, volume 414, issue 1, January 2012, pages 20-37.  Also arXiv:1011.5788 [math.CO], 2010-2011. Example DDUU briefly at start of section 4 and end of section 10.
Donald E. Knuth, Selected Papers on Fun and Games, CSLI Lecture Notes Number 192, CSLI Publications, 2010, ISBN 978-1-57586-585-0, pages 603-614 addendum to reprint of Number Representations and Dragon Curves. Example (DDUU)*3 drawn page 607.
Kevin Ryde, Iterations of the R5 Dragon Curve, section Turn.
FORMULA
a(n) = 1 if A277543(n) = 1 or 2, or a(n) = -1 otherwise, where A277543(n) is the lowest non-0 digit of n written in base 5.
a(n) = 1 or -1 according as A175337(n-1) = 0 or 1 respectively.
Morphism 1 -> 1,1,-1,-1,1 and -1 -> 1,1,-1,-1,-1 starting from 1.
G.f.: Sum_{k>=0} (x^(5^k) + x^(2*5^k) - x^(3*5^k) - x^(4*5^k)) / (1 - x^(5^(k+1))).
PROG
(PARI) a(n) = my(r); until(r, [n, r]=divrem(n, 5)); if(r<=2, 1, -1);
CROSSREFS
Cf. A175337 (as 0,1), A170823 (partial sums mod 3).
Sequence in context: A210247 A256175 A319116 * A343785 A359738 A360710
KEYWORD
base,sign
AUTHOR
Kevin Ryde, Aug 11 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 09:52 EDT 2024. Contains 371698 sequences. (Running on oeis4.)