OFFSET
0,2
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
MATHEMATICA
dtn[ L_ ] := Fold[ 2#1+#2&, 0, L ]; h[ n_ ] := dtn[ {1}~Join~Table[ Mod[ 1+Apply[ Plus, Take[ IntegerDigits[ n, 2 ], k ] ], 2 ], {k, 1, Length[ IntegerDigits[ n, 2 ] ]} ] ]; Table[ h[ n ], {n, 100} ]
PROG
(Haskell)
import Data.List (elemIndex)
import Data.Maybe (fromJust)
a038558 = fromJust . (`elemIndex` a038554_list)
-- Reinhard Zumkeller, Mar 06 2013
CROSSREFS
KEYWORD
nonn,nice,easy
AUTHOR
EXTENSIONS
More terms from Erich Friedman
a(0)=0 added and offset adjusted by Reinhard Zumkeller, Mar 06 2013
STATUS
approved