login
A084473
Replace 0 with 0000 in binary representation of n.
4
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,2
COMMENTS
a(n) = n iff n = 2^k - 1, k>0 (A000225). - Bernard Schott, Dec 18 2021
LINKS
FORMULA
a(1)=1, a(2*k+1)=2*a(k)+1, a(2*k)=16*a(k).
a(n) = A084471(A084471(n)).
A084474(n) = A007088(a(n));
A023416(a(n)) = A023416(n)*4.
A000120(a(n)) = A000120(n).
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 *)
PROG
(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
(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
CROSSREFS
Column k=4 of A340666.
Sequence in context: A070582 A070569 A317316 * A343051 A040246 A075462
KEYWORD
nonn,base,look
AUTHOR
Reinhard Zumkeller, May 27 2003
STATUS
approved