login
A374646
Paradiddle Thue-Morse.
1
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, 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, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1
OFFSET
0,1
COMMENTS
A paradiddle is a basic pattern when learning drums, as either "left left right left" or "right right left right".
A paradiddle as a Thue-Morse type sequence can be done by convention of left being 0 and right being 1, or vice-verse.
Limiting word of the morphism with maps 0 |--> 0100, 1 |--> 1011 and axiom 1011. - Joerg Arndt, Jul 15 2024
EXAMPLE
k = 0: Sequence starts at its simplest form;
1.
-----------------------------------------------
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;
1, 0, 1, 1.
-----------------------------------------------
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};
1, 0, 1, 1,
0, 1, 0, 0,
1, 0, 1, 1,
1, 0, 1, 1.
-----------------------------------------------
k = 3: The expansion is applied recursively based on k-1, resulting in;
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, 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.
MATHEMATICA
SubstitutionSystem[{1 -> {1, 0, 1, 1}, 0 -> {0, 1, 0, 0}}, {1}, {4}] // Flatten
PROG
(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
CROSSREFS
Cf. A130198 (single paradiddle).
Cf. A374724.
Sequence in context: A129360 A129372 A169591 * A189295 A004539 A354805
KEYWORD
nonn,easy
AUTHOR
Robert P. P. McKone, Jul 15 2024
STATUS
approved