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.

A379036 Indices of zeros in binary concatenation of primes.

Original entry on oeis.org

1, 5, 11, 16, 19, 20, 21, 24, 25, 29, 36, 44, 45, 47, 50, 52, 53, 56, 58, 62, 69, 71, 76, 83, 86, 87, 88, 89, 93, 94, 95, 100, 101, 103, 104, 107, 108, 114, 116, 117, 121, 124, 125, 129, 130, 131, 132, 136, 137, 139, 143, 144, 150, 152, 157, 160, 165, 166, 167
Offset: 1

Views

Author

Alexandre Herrera, Dec 14 2024

Keywords

Comments

The initial bit is labeled as bit 0.

Examples

			The primes, their binary expansions, and positions of successive zero bits, begin
   prime    2  3   5   7   11 ...
   binary  10 11 101 111 1011 ...
   zeros    ^     ^       ^
   a(n) =   1     5      11   ...
		

Crossrefs

Programs

  • Mathematica
    seq[lim_] := -1 + Position[Flatten@ IntegerDigits[Prime[Range[lim]], 2], 0] // Flatten; seq[30] (* Amiram Eldar, Dec 31 2024 *)
  • Python
    import sympy
    l = []
    bin_primes = ""
    for i in range(1,27):
        bin_primes += bin(sympy.prime(i))[2:]
    for i in range(len(bin_primes)):
        if bin_primes[i] == '0':
            l.append(i)
    print(l)