OFFSET
0,3
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..1000
FORMULA
a(n) = 2*a(n-1) + A003849(n) for n > 0, a(0) = 0.
EXAMPLE
0 -> 0 -> a(0) = 0,
0,1 -> 01 -> a(1) = 1,
0,1,0 -> 010 -> a(2) = 2,
0,1,0,0 -> 0100 -> a(3) = 4,
0,1,0,0,1 -> 01001 -> a(4) = 9,
0,1,0,0,1,0 -> 010010 -> a(5) = 18,
0,1,0,0,1,0,1 -> 0100101 -> a(6) = 37
0,1,0,0,1,0,1,0 -> 01001010 -> a(7) = 74
0,1,0,0,1,0,1,0,0 -> 010010100 -> a(8) = 148,
0,1,0,0,1,0,1,0,0,1 -> 0100101001 -> a(9) = 297.
MATHEMATICA
nesting = 7; A003849 = Flatten[Nest[{#, #[[1]]}&, {0, 1}, nesting]]; a[n_] := FromDigits[Take[A003849, n+1], 2]; Table[a[n], {n, 0, Length[A003849] - 1}] (* Jean-François Alcover, Feb 13 2016 *)
PROG
(Haskell)
a182028 n = a182028_list !! n
a182028_list = scanl1 (\v b -> 2 * v + b) a003849_list
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Apr 07 2012
STATUS
approved