Baum-Sweet Sequence

Author

Eric W. Weisstein
April 10, 2006

This notebook downloaded from http://mathworld.wolfram.com/notebooks/IntegerSequences/Baum-SweetSequence.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/Baum-SweetSequence.html.

©2006 Wolfram Research, Inc. except for portions noted otherwise

Code

BaumSweet[n_]:=Boole[FreeQ[Length/@Select[Split[IntegerDigits[n,2]],First[#]==0&],_?OddQ]]

Sequence

BaumSweet/@Range[100]

Definition of (Subscript[b, 0])seems ambigous.  Allouche and Shallit take (Subscript[b, 0])=1, but it contains a block 0 which is of odd length...

Length/@Select[Split[IntegerDigits[0,2]],First[#]==0&]

BaumSweet[0]

Position[BaumSweet/@Range[100],1]//Flatten

Position[BaumSweet/@Range[100],0]//Flatten

Recurrence Plot

l=BaumSweet/@Range[200];

ArrayPlot[Mod[Table[l[[x]]-l[[y]],{x,128},{y,128}],2],PixelConstrained->True]

ArrayPlot[Mod[Table[l[[x]]-l[[y]],{x,128},{y,128}],3],PixelConstrained->True,ColorRules->{0->Yellow,1->Green,2->Blue}]