OFFSET
0,2
EXAMPLE
a(1) = 3, as 1 is 1 in binary and doubling the number of 1's (in the only run) gives binary 11, 3 in decimal. a(9) = 49, as 9 is 1001 in binary and replacing the most significant run '1' with '11' and the center run '00' with '000' and the least significant run '1' with '1', we get 110001 in binary, 49 in decimal.
PROG
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, May 01 2007
EXTENSIONS
Edited definition. - N. J. A. Sloane, Dec 20 2023
STATUS
approved