OFFSET
0,3
COMMENTS
a(2^n) = 2^(n*(n+3)/2).
LINKS
EXAMPLE
. ----+------------+------------------+---------------+-----
. 2 | 10 | 10, 0 | 100 | 4
. 3 | 11 | 11, 1 | 111 | 7
. 4 | 100 | 100, 00, 0 | 100000 | 32
. 5 | 101 | 101, 01, 1 | 101011 | 43
. 6 | 110 | 110, 10, 0 | 110100 | 52
. 7 | 111 | 111, 11, 1 | 111111 | 63
. 8 | 1000 | 1000, 000, 00, 0 | 1000000000 | 512
. 9 | 1001 | 1001, 001, 01, 1 | 1001001011 | 587
. 10 | 1010 | 1010, 010, 10, 0 | 1010010100 | 660
. 11 | 1011 | 1011, 011, 11, 1 | 1011011111 | 735
. 12 | 1100 | 1100, 100, 00, 0 | 1100100000 | 800 .
PROG
(Haskell)
import Data.List (inits, unfoldr); import Data.Tuple (swap)
a241426 = foldr (\b v -> 2 * v + b) 0 . concat . inits .
unfoldr (\x -> if x == 0 then Nothing
else Just $ swap $ divMod x 2)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Aug 08 2014
STATUS
approved