OFFSET
0,1
COMMENTS
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
EXAMPLE
n=10 is A007088(10)= 1010 in binary, reverted 0101. Adding 2222 generates a(10)=2323.
MATHEMATICA
Table[Sum[Table[((IntegerDigits[ n, 2]) /. 0 -> 2) /. 1 -> 3, {n, 0, 50}][[n]][[m]]*10^(m - 1),
{m, 1, Length[Table[((IntegerDigits[n, 2]) /. 0 -> 2) /. 1 -> 3, {n, 0, 50}][[n]]]}], {n, 1, 51}]
PROG
(Haskell)
import Data.List (unfoldr); import Data.Tuple (swap)
a176892 0 = 2a176892 n = foldl (\v d -> 10 * v + d + 2) 0 $
unfoldr (\x -> if x == 0 then Nothing else Just $ swap $ divMod x 2) n
-- Reinhard Zumkeller, Jul 16 2015
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Roger L. Bagula, Apr 28 2010
STATUS
approved