Reverse-Then-Add Sequence

Author

Eric W. Weisstein
April 27, 2002

This notebook downloaded from http://mathworld.wolfram.com/notebooks/IntegerSequences/Reverse-Then-AddSequence.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/Reverse-Then-AddSequence.html.

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

Reverse-then-add

ReverseThenAddList[n_Integer?Positive,b_:10,its_]:=NestList[#+FromDigits[Reverse[IntegerDigits[#,b]],b]&,n,its]

ReverseThenAdd[n_,b_:10,its_:1]:=Nest[#+FromDigits[Reverse[IntegerDigits[#,b]],b]&,n,its]

Table[ReverseThenAdd[n,10,1],{n,20}]

A056964

Iterations in Base-2

ReverseThenAddList[16,2,5]

IntegerDigits[ReverseThenAddList[16,2,5],2]//ColumnForm

Show[GraphicsArray[{
RasterGraphics[IntegerDigits[#,2,1+Floor[Log[2,Max[#]]]]&[ReverseThenAddList[16,2,250]],DisplayFunction->Identity],
Show[RasterGraphics[IntegerDigits[#,2,1+Floor[Log[2,Max[#]]]]&[ReverseThenAddList[512,2,500]],DisplayFunction->Identity]]
}]]