%I #4 May 09 2021 09:59:14
%S 0,1,1,4,4,6,9,10,10,12,14,16,19,20,21,22,22,24,26,28,30,32,34,36,39,
%T 40,41,42,43,44,45,46,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,
%U 79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,94,96
%N a(n) = A343984(n)/2.
%C a(n) is the number of n-digit singular subwords of the Thue-Morse word A010060 that end with 0; a subword w is singular if exactly one of the words w0 and w1 is also a subword.
%e The six 3-digit subwords of A010060 are 001, 010, 011, 100, 101, 110. Each, except for 011 and 100, is the initial 3-letter word of two 4-letter subwords. Thus, a(3) = 1.
%t TM = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {1, 0}}] &, {0}, 12]; (* A010060 *)
%t t[k_, n_] := t[k, n] = Take[TM, {n, n + k - 1}];
%t c[k_] := c[k] = Union[Table[t[k, n], {n, 1, Length[TM] - k + 1}]];
%t s[n_] := s[n] = Select[c[n], ! MemberQ[c[n + 1],
%t Join[#, {0}]] || !MemberQ[c[n + 1], Join[#, {1}]] &]
%t Table[s[n], {n, 1, 8}]
%t u = Table[Length[s[n]], {n, 1, 60}] (* A343984 *)
%t u/2 (* A343985 *)
%Y Cf. A010060, A343984.
%K nonn
%O 1,4
%A _Clark Kimberling_, May 07 2021