cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A201992 Numbers whose binary representations are found in the Thue-Morse sequence.

This page as a plain text file.
%I A201992 #27 Apr 03 2018 14:32:04
%S A201992 0,1,2,3,4,5,6,9,10,11,12,13,18,19,20,22,25,26,37,38,41,44,45,50,51,
%T A201992 52,75,76,77,82,83,89,90,101,102,105,150,153,154,165,166,179,180,203,
%U A201992 205,210,211,300,301,306,308,331,332,358,361,406,410,421,422,601
%N A201992 Numbers whose binary representations are found in the Thue-Morse sequence.
%C A201992 Interpreting A010060 as a bit string, this sequence contains the decimal equivalents of the subsequences, in order.
%H A201992 Walt Rorie-Baety, <a href="/A201992/b201992.txt">Table of n, a(n) for n = 0..2500</a>
%H A201992 Project Euler, <a href="http://projecteuler.net/problem=361">Problem 361: Subsequence of Thue-Morse sequence</a>
%e A201992 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.
%t A201992 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 *)
%o A201992 (Haskell) a201992 = 0: concatMap (\n -> Set.toList . Set.fromList . map binRep . filter ((==[1]).take 1) . window n . take (n*2^n) $ a010060) [1..] where
%o A201992   {window n = takeWhile (full . drop (n-1)) . map (take n) .  tails; binRep = foldl' (\a b -> 2*a+b) 0}; full = not . null
%Y A201992 Cf. A010060, A063037.
%K A201992 nonn,base,nice
%O A201992 0,3
%A A201992 _Walt Rorie-Baety_, Dec 07 2011
%E A201992 Helper function added and name of value in program changed for better understanding by _Walt Rorie-Baety_, Mar 25 2012