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 A176416 #29 Jun 04 2025 10:53:01 %S A176416 0,1,1,-1,-1,0,0,0,1,1,-1,-1,0,1,0,1,1,-1,-1,0,1,0,1,1,-1,-1,0,-1,0,1, %T A176416 1,-1,-1,0,-1,0,1,1,-1,-1,0,0,0,1,1,-1,-1,0,0,0,1,1,-1,-1,0,0,0,1,1, %U A176416 -1,-1,0,1,0,1,1,-1,-1,0,1,0,1,1,-1,-1,0,-1,0,1 %N A176416 Fixed point of morphism 0->0PPMM00, P->0PPMM0P, M=0PPMM0M (where P=+1, M=-1). %C A176416 Turns by 120 degrees of a dragon curve (see fxtbook link below). %C A176416 Also fixed point of morphism F->F0FPFPFMFMF0F, 0->0, P->P, M->M (after deleting all F). %C A176416 Let d(n) be the lowest nonzero digit in the radix-7 expansion of (n+1), then if d(n)==[1,2,3,4,5,6] ==> a(n):=[0,+1,+1,-1,-1,0]. %C A176416 This is a 7-automatic sequence. - _Joerg Arndt_, Nov 09 2023 %H A176416 Paolo Xausa, <a href="/A176416/b176416.txt">Table of n, a(n) for n = 0..10000</a> %H A176416 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.98 %t A176416 First[SubstitutionSystem[{t_ :> {0, 1, 1, -1, -1, 0, t}}, {0}, {3}]] (* _Paolo Xausa_, Jun 04 2025 *) %o A176416 (C++) /* CAT-algorithm */ %o A176416 int bit_dragon_r7_2_turn(unsigned long &x) %o A176416 /* Increment the radix-7 word x and return (tr) %o A176416 according to the lowest nonzero digit d of the incremented word: %o A176416 d==[1,2,3,4,5,6] ==> rt:=[0,+1,+1,-1,-1,0] */ %o A176416 { %o A176416 unsigned long s = 0; %o A176416 while ( (x & 7) == 6 ) { x >>= 3; ++s; } /* scan over nines */ %o A176416 ++x; /* increment next digit */ %o A176416 int tr = 2 - ( (0x2f58 >> (2*(x&7)) ) & 3 ); x <<= (3*s); /* shift back */ %o A176416 return tr; %o A176416 } %Y A176416 Cf. A080846 (with terdragon curve), A014577 (with Heighway dragon), A175337 (with R5-dragon), and A176405 (with R7-dragon). %K A176416 sign %O A176416 0,1 %A A176416 _Joerg Arndt_, Apr 17 2010