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.

A058935 Concatenation of first n binary numbers.

Original entry on oeis.org

0, 1, 110, 11011, 11011100, 11011100101, 11011100101110, 11011100101110111, 110111001011101111000, 1101110010111011110001001, 11011100101110111100010011010, 110111001011101111000100110101011, 1101110010111011110001001101010111100
Offset: 0

Views

Author

Henry Bottomley, Jan 12 2001

Keywords

Comments

If the terms are read as decimal numbers, which of them are primes? For example, a(5) = 11011100101 = 1193*9229757 is not a prime. - N. J. A. Sloane, Feb 17 2023
Answer: a(231) is the first prime term when read as a decimal number; a(15) is the first when read as a binary number. - Michael S. Branicky, Feb 17 2023

Crossrefs

Cf. A047778 for this converted to decimal, A001855 (offset) for number of digits.
Cf. A066716: binary Champernowne constant, A030302: binary digits, A030190: same with initial 0, A030303: indices of 1's, A007088.
Other bases: A117640 (4), A007908 (10).

Programs

  • Mathematica
    FromDigits /@ Flatten /@ Rest[FoldList[Append, {}, IntegerDigits[Range[10], 2]]] (* Eric W. Weisstein, Nov 04 2015 *)
  • Python
    from itertools import count, islice
    def agen(s=""): yield from (int(s:=s+bin(n)[2:]) for n in count(0))
    print(list(islice(agen(), 13))) # Michael S. Branicky, Feb 17 2023
    
  • Python
    from functools import reduce
    def A058935(n): return int(bin(reduce(lambda i,j:(i<Chai Wah Wu, Feb 26 2023

Formula

a(n) = a(n-1)*10^A029837(n) + A007088(n).