OFFSET
0,3
COMMENTS
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..16384
FORMULA
EXAMPLE
Here is the list A076478 broken up to show the successive binary numbers (the indexing starts at 0):
0,
1,
0,0,
0,1,
1,0,
1,1,
0,0,0,
0,0,1,
0,1,0,
0,1,1,
1,0,0,
1,0,1,
...
2 = 1,0 starts at position 6, so a(2) = 6.
4 = 1,0,0 starts at position 22, so a(4) = 22.
PROG
(PARI) a(n) = my (w=#binary(n)); return (2 + 2^w*(w-2) + w*n) \\ Rémy Sigrist, Dec 15 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Dec 14 2017
EXTENSIONS
More terms from Rémy Sigrist, Dec 15 2017
STATUS
approved