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.

A317947 Concatenate n and n-1 in binary.

Original entry on oeis.org

10, 101, 1110, 10011, 101100, 110101, 111110, 1000111, 10011000, 10101001, 10111010, 11001011, 11011100, 11101101, 11111110, 100001111, 1000110000, 1001010001, 1001110010, 1010010011, 1010110100, 1011010101, 1011110110, 1100010111, 1100111000, 1101011001, 1101111010, 1110011011, 1110111100
Offset: 1

Views

Author

N. J. A. Sloane, Aug 11 2018

Keywords

Crossrefs

Cf. A000523, A007088, A127423 (base 10 version).

Programs

  • Maple
    f:= proc(n) local A;
      A:= convert(n-1,binary);
      10^length(A)*convert(n,binary)+A
    end proc:
    f(1):= 10:
    map(f, [$1..100]); # Robert Israel, Aug 12 2018
  • PARI
    zbinary(n) = if (n, binary(n), [0]);
    a(n) = fromdigits(concat(zbinary(n), zbinary(n-1))); \\ Michel Marcus, Aug 12 2018

Formula

a(n) = A007088(n-1)+10^(1+A000523(n-1))*A007088(n) for n >= 2. - Robert Israel, Aug 12 2018

Extensions

More terms from Robert Israel, Aug 12 2018