cp's OEIS Frontend

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.

Showing 1-1 of 1 results.

A374646 Paradiddle version of Thue-Morse sequence.

Original entry on oeis.org

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

Views

Author

Robert P. P. McKone, Jul 15 2024

Keywords

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

Examples

			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.
		

Crossrefs

Cf. A160381, A130198 (single paradiddle), A010059, A010060, A374724.

Programs

  • Mathematica
    SubstitutionSystem[{1 -> {1, 0, 1, 1}, 0 -> {0, 1, 0, 0}}, {1}, {4}] // Flatten
  • 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

Formula

a(n) = A160381(n)+1 mod 2. - Kevin Ryde, Dec 28 2024
Showing 1-1 of 1 results.