cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A084473 Replace 0 with 0000 in binary representation of n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, May 27 2003

Keywords

Comments

a(n) = n iff n = 2^k - 1, k>0 (A000225). - Bernard Schott, Dec 18 2021

Crossrefs

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

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).

A084472 Write n in binary and replace 0 with 00.

Original entry on oeis.org

1, 100, 11, 10000, 1001, 1100, 111, 1000000, 100001, 100100, 10011, 110000, 11001, 11100, 1111, 100000000, 10000001, 10000100, 1000011, 10010000, 1001001, 1001100, 100111, 11000000, 1100001, 1100100, 110011, 1110000
Offset: 1

Views

Author

Reinhard Zumkeller, May 27 2003

Keywords

Comments

a(n)=A007088(A084471(n)).

Crossrefs

Programs

  • Mathematica
    Table[FromDigits[Flatten[IntegerDigits[n,2]/.(0->{0,0})]],{n,30}] (* Harvey P. Dale, Aug 27 2019 *)
Showing 1-2 of 2 results.