login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A374646
Paradiddle version of Thue-Morse sequence.
2
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 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.
Limiting word of the morphism with maps 0 |--> 0100, 1 |--> 1011 and axiom 1011. - Joerg Arndt, Jul 15 2024
FORMULA
a(n) = A160381(n)+1 mod 2. - Kevin Ryde, Dec 28 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, giving:
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. A160381, A130198 (single paradiddle), A010059, A010060, A374724.
Sequence in context: A129360 A129372 A169591 * A189295 A004539 A354805
KEYWORD
nonn,easy
AUTHOR
Robert P. P. McKone, Jul 15 2024
STATUS
approved