OFFSET
0,15
EXAMPLE
a(54)=2 because 54 = 110110 base 2, which can be read as one 1 followed by zero 1's followed by one 0, i.e., 10 base 2 = 2 base 10.
PROG
(Python)
def A056966(n):
s = bin(n)[2:]
s = '0'*(len(s)&1)+s
return int('0'+''.join(s[i+1]*int(s[i])for i in range(0, len(s), 2)), 2) # Chai Wah Wu, Feb 12 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Henry Bottomley, Jul 20 2000
STATUS
approved