VOOZH about

URL: https://oeis.org/A392743

⇱ A392743 - OEIS


login
A392743
a(n) = A392736(2*n + 1 - A392736(n)).
1
1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0
OFFSET
0
COMMENTS
Let M(n) = A392736(n) be the Meta-Thue-Morse sequence. Then the pair (M(n), a(n)) encodes sufficient information to compute M(2n) and M(2n+1).
FORMULA
a(n) = A392736(2n) if A392736(n) = 1 and a(n) = A392736(2n+1) if A392736(n) = 0.
EXAMPLE
For n=0: M(0)=0, so a(0) = M(2*0+1-0) = M(1) = 1.
For n=3: M(3)=0, so a(3) = M(2*3+1-0) = M(7) = 0.
MATHEMATICA
M[0] = 0; M[1] = 1; M[n_] := M[n] = Which[Mod[n, 4] == 0, M[Quotient[n, 4]], Mod[n, 4] == 1, 1 - M[Quotient[n, 4]], Mod[n, 4] == 2, M[2*Quotient[n, 4] + 1 - M[Quotient[n, 4]]], True, 1 - M[2*Quotient[n, 4] + 1 - M[Quotient[n, 4]]]]; Table[M[2n + 1 - M[n]], {n, 0, 79}]
PROG
(PARI) M(n) = if(n<2, n, my(q=n\4, r=n%4); if(r==0, M(q), r==1, 1-M(q), r==2, M(2*q+1-M(q)), 1-M(2*q+1-M(q))));
a(n) = M(2*n + 1 - M(n));
CROSSREFS
Cf. A392736 (Meta-Thue-Morse).
Sequence in context: A192687 A189141 A082416 * A093996 A323095 A336868
KEYWORD
nonn,easy
AUTHOR
STATUS
approved