A246147 Index sequence for limit-block extending A010060 (Thue-Morse sequence) with first term as initial block.
0, 3, 6, 12, 20, 30, 36, 68, 92, 116, 132, 156, 180, 228, 260, 308, 356, 420, 452, 516, 564, 612, 676, 708, 756, 804, 836, 900, 948, 996, 1076, 1188, 1268, 1316, 1460, 1572, 1716, 1764, 1844, 1956, 2100, 2212, 2292, 2340, 2484, 2740, 2868, 3060, 3252, 3380
Offset: 0
Keywords
Examples
S = A010060, with B = (s(0)); that is, (m,k) = (0,0) S = (0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,...) B'(0) = (0) B'(1) = (0,1) B'(2) = (0,1,1) B'(3) = (0,1,1,0) B'(4) = (0,1,1,0,0) B'(5) = (0,1,1,0,0,1) S^ = (0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,...), with index sequence (0,3,6,12,20,30,36,68,...)
Programs
-
Mathematica
seqPosition1[list_, seqtofind_] := If[Length[#] > Length[list], {}, Last[Last[Position[Partition[list, Length[#], 1], Flatten[{_, #, _}], 1, 1]]]] &[seqtofind]; s = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {1, 0}}] &, {0}, 14]; (* A010060 *) Take[s, 60] t = {{0}}; p[0] = seqPosition1[s, Last[t]]; s = Drop[s, p[0]]; Off[Last::nolast]; n = 1; While[(p[n] = seqPosition1[s, Last[t]]) > 0, (AppendTo[t, Take[s, {#, # + Length[Last[t]]}]]; s = Drop[s, #]) &[p[n]]; n++]; On[Last::nolast]; Last[t] (* A246146 *) -1 + Accumulate[Table[p[k], {k, 0, n - 1}]] (* A246147 *)
Comments