%I #18 Jan 31 2026 14:57:09
%S 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,
%T 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,
%U 0,0,1,1,0,1,0,0,1,1,1,0
%N a(n) = A392736(2*n + 1 - A392736(n)).
%C 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).
%F a(n) = A392736(2n) if A392736(n) = 1 and a(n) = A392736(2n+1) if A392736(n) = 0.
%e For n=0: M(0)=0, so a(0) = M(2*0+1-0) = M(1) = 1.
%e For n=3: M(3)=0, so a(3) = M(2*3+1-0) = M(7) = 0.
%t 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}]
%o (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))));
%o a(n) = M(2*n + 1 - M(n));
%Y Cf. A392736 (Meta-Thue-Morse).
%K nonn,easy
%O 0
%A _John M. Campbell_ and _Benoit Cloitre_, Jan 21 2026