OFFSET
0,3
COMMENTS
Interpreting A010060 as a bit string, this sequence contains the decimal equivalents of the subsequences, in order.
LINKS
Walt Rorie-Baety, Table of n, a(n) for n = 0..2500
Project Euler, Problem 361: Subsequence of Thue-Morse sequence
EXAMPLE
The binary representation of 21 (10101) has an overlapping square sequence (1X1X1, where X is any binary sequence, in this case, X = 0), and so is not in the sequence. Compare to A063037.
MATHEMATICA
Module[{nn=10000, tm}, tm=Table[ThueMorse[n], {n, 0, nn}]; Join[{0}, Position[ Table[ If[SequenceCount[tm, IntegerDigits[k, 2]]>0, 1, 0], {k, 1000}], 1]]]// Flatten (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 03 2018 *)
PROG
(Haskell) a201992 = 0: concatMap (\n -> Set.toList . Set.fromList . map binRep . filter ((==[1]).take 1) . window n . take (n*2^n) $ a010060) [1..] where
{window n = takeWhile (full . drop (n-1)) . map (take n) . tails; binRep = foldl' (\a b -> 2*a+b) 0}; full = not . null
CROSSREFS
KEYWORD
nonn,base,nice
AUTHOR
Walt Rorie-Baety, Dec 07 2011
EXTENSIONS
Helper function added and name of value in program changed for better understanding by Walt Rorie-Baety, Mar 25 2012
STATUS
approved