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 A374646 #45 Jan 11 2025 04:46:50 %S A374646 1,0,1,1,0,1,0,0,1,0,1,1,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,0,1,0,0,1,0, %T A374646 1,1,0,1,0,0,1,0,1,1,1,0,1,1,1,0,1,1,0,1,0,0,1,0,1,1,1,0,1,1,0,1,0,0, %U A374646 1,0,1,1,0,1,0,0,0,1,0,0,1,0,1,1 %N A374646 Paradiddle version of Thue-Morse sequence. %C A374646 A paradiddle is a basic drum pattern, either "left left right left" or "right right left right". We can take left, right to be either 0, 1 or 1, 0. %C A374646 Limiting word of the morphism with maps 0 |--> 0100, 1 |--> 1011 and axiom 1011. - _Joerg Arndt_, Jul 15 2024 %H A374646 Robert P. P. McKone, <a href="/A374646/b374646.txt">Table of n, a(n) for n = 0..16383</a> %H A374646 <a href="/index/Fi#FIXEDPOINTS">Index entries for sequences that are fixed points of mappings</a> %F A374646 a(n) = A160381(n)+1 mod 2. - _Kevin Ryde_, Dec 28 2024 %e A374646 k = 0: Sequence starts at its simplest form; %e A374646 1. %e A374646 ----------------------------------------------- %e A374646 k = 1: The 1 of the initial sequence expands following the morphism rules, where 1 -> {1, 0, 1, 1} and 0 -> {0, 1, 0, 0}, resulting in; %e A374646 1, 0, 1, 1. %e A374646 ----------------------------------------------- %e A374646 k = 2: Each element of the initial sequence expands following the morphism rules, where 1 -> {1, 0, 1, 1} and 0 -> {0, 1, 0, 0}; %e A374646 1, 0, 1, 1, %e A374646 0, 1, 0, 0, %e A374646 1, 0, 1, 1, %e A374646 1, 0, 1, 1. %e A374646 ----------------------------------------------- %e A374646 k = 3: The expansion is applied recursively, giving: %e A374646 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, %e A374646 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, %e A374646 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, %e A374646 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1. %t A374646 SubstitutionSystem[{1 -> {1, 0, 1, 1}, 0 -> {0, 1, 0, 0}}, {1}, {4}] // Flatten %o A374646 (PARI) first(n,v=[1])=if(n>4*#v, v=first((n+3)\4)); my(u=List()); for(i=1,#v-1, listput(u,v[i]); listput(u,1-v[i]); listput(u,v[i]); listput(u,v[i])); my(t=vector(n-#u,i,if(i==2,1-v[#v],v[#v]))); for(j=1,#t, listput(u,t[j])); Vec(u) \\ _Charles R Greathouse IV_, Jul 31 2024 %Y A374646 Cf. A160381, A130198 (single paradiddle), A010059, A010060, A374724. %K A374646 nonn,easy %O A374646 0,1 %A A374646 _Robert P. P. McKone_, Jul 15 2024