OFFSET
1,2
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
Chai Wah Wu, Record values in appending and prepending bitstrings to runs of binary digits, arXiv:1810.02293 [math.NT], 2018.
FORMULA
a(n) = A320262(n)/2.
EXAMPLE
6 in binary is 110. Modify each run by prepending a 0 to get 01100, which is 12 in decimal. So a(6) = 12.
PROG
(Python)
from re import split
def A320263(n):
return int(''.join('0'+d for d in split('(0+)|(1+)', bin(n)[2:]) if d != '' and d != None), 2)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Chai Wah Wu, Oct 08 2018
STATUS
approved