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.

A084471 Change 0 to 00 in binary representation of n.

Original entry on oeis.org

1, 4, 3, 16, 9, 12, 7, 64, 33, 36, 19, 48, 25, 28, 15, 256, 129, 132, 67, 144, 73, 76, 39, 192, 97, 100, 51, 112, 57, 60, 31, 1024, 513, 516, 259, 528, 265, 268, 135, 576, 289, 292, 147, 304, 153, 156, 79, 768, 385, 388, 195, 400, 201, 204, 103, 448, 225
Offset: 1

Views

Author

Reinhard Zumkeller, May 27 2003

Keywords

Comments

a(n) = n iff n = 2^k - 1, k>0.
A023416(a(n))=A023416(n)*2; A000120(a(n))=A000120(n);

Crossrefs

Cf. A084472(n)=A007088(a(n)), A084473, A038573.
Ordered terms are in A060142.
Column k=2 of A340666.
Cf. A088698, A175047. - Robert G. Wilson v, Dec 10 2009

Programs

  • Haskell
    a084471 1 = 1
    a084471 x = 2 * (2 - d) * a084471 x' + d  where (x',d) = divMod x 2
    -- Reinhard Zumkeller, Jul 16 2012
  • Maple
    a:= n-> Bits[Join](subs(0=[0$2][], Bits[Split](n))):
    seq(a(n), n=1..60);  # Alois P. Heinz, Jan 15 2021
  • Mathematica
    f[n_] := FromDigits[Flatten[IntegerDigits[n, 2] /. {0 -> {0, 0}}], 2]; Array[f, 60] (* Robert G. Wilson v, Dec 10 2009 *)

Formula

a(1)=1, a(2*k+1)=2*a(k)+1, a(2*k)=4*a(k).