login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A175337 Fixed point of morphism 0 -> 00110, 1 -> 00111 3

%I

%S 0,0,1,1,0,0,0,1,1,0,0,0,1,1,1,0,0,1,1,1,0,0,1,1,0,0,0,1,1,0,0,0,1,1,

%T 0,0,0,1,1,1,0,0,1,1,1,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,1,0,0,1,

%U 1,1,0,0,1,1,1,0,0,1,1,0,0,0,1,1,0,0,0,1,1,1,0,0,1,1,1,0,0,1,1,1,0,0,1,1,0

%N Fixed point of morphism 0 -> 00110, 1 -> 00111

%C Turns (by 90 degrees) of a dragon curve (called R5-dragon in the fxtbook, see link below) which can be rendered as follows:

%C [Init] Set n=0 and direction=0.

%C [Draw] Draw a unit line (in the current direction). Turn left/right if a(n) is zero/nonzero respectively.

%C [Next] Set n=n+1 and goto (draw).

%C With counting in radix 5: whether the lowest nonzero digit is >2 (see C++ code).

%C With morphism F -> F0F0F1F1F, 0 -> 0, 1 -> 1: fixed point with all 'F' omitted.

%H Joerg Arndt, <a href="http://www.jjj.de/fxt/#fxtbook">Matters Computational (The Fxtbook)</a>, section 1.31.5 "Dragon curves based on radix-R counting", pp.95-101; image on p.96

%o (C++) /* CAT algorithm */

%o bool bit_dragon_r5_turn(ulong &x)

%o /* Increment the radix-5 word x and return (tr) whether

%o the lowest nonzero digit of the incremented word is > 2. */

%o {

%o ulong s = 0;

%o while ( (x & 7) == 4 ) { x >>= 3; ++s; } /* scan over nines */

%o bool tr = ( (x & 7) >= 2 ); /* whether digit will be > 2 */

%o ++x; /* increment next digit */

%o x <<= (3*s); /* shift back */

%o return tr;

%o }

%Y Cf. A080846 (with terdragon curve) and A014577 (with Heighway dragon).

%K nonn

%O 0,1

%A _Joerg Arndt_, Apr 15 2010

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 10 08:09 EDT 2021. Contains 342845 sequences. (Running on oeis4.)