A084473 Replace 0 with 0000 in binary representation of n.
1, 16, 3, 256, 33, 48, 7, 4096, 513, 528, 67, 768, 97, 112, 15, 65536, 8193, 8208, 1027, 8448, 1057, 1072, 135, 12288, 1537, 1552, 195, 1792, 225, 240, 31, 1048576, 131073, 131088, 16387, 131328, 16417, 16432, 2055, 135168, 16897, 16912, 2115, 17152, 2145
Offset: 1
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..8191
Programs
-
Haskell
a084473 1 = 1 a084473 x = 2 * (if b == 1 then 1 else 8) * a084473 x' + b where (x', b) = divMod x 2 -- Reinhard Zumkeller, Mar 31 2015
-
Maple
a:= n-> Bits[Join](subs(0=[0$4][], Bits[Split](n))): seq(a(n), n=1..49); # Alois P. Heinz, Jan 15 2021
-
Mathematica
a[n_] := FromDigits[IntegerDigits[n, 2] /. 0 -> Sequence@@{0,0,0,0}, 2]; Array[a, 50] (* Jean-François Alcover, Dec 16 2021 *)
-
Python
def a(n): return int(bin(n)[2:].replace('0', '0000'), 2) print([a(n) for n in range(1, 46)]) # Michael S. Branicky, Jan 15 2021
Comments