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-1 of 1 results.

A319406 Write n-th prime in binary, then increase each run of 0's by one 0, and increase each run of 1's by one 1. a(n) is the decimal equivalent of the result.

Original entry on oeis.org

12, 7, 51, 15, 103, 115, 195, 199, 207, 243, 63, 1587, 1635, 1639, 415, 1843, 487, 499, 775, 783, 3171, 799, 3271, 3299, 899, 3635, 911, 3687, 3699, 963, 255, 1543, 6243, 6247, 25395, 6351, 6387, 6535, 6543, 26227, 6599, 26419, 1663, 1795, 7219, 1807, 7367
Offset: 1

Views

Author

N. J. A. Sloane, Sep 19 2018

Keywords

Comments

Apply A175046 to the primes.

Crossrefs

Cf. A175046.
A companion to A318923.

Programs

  • Python
    from sympy import prime
    def a(n):
        b = bin(prime(n))[2:]
        return int(b.replace("01", "001").replace("10", "110") + b[-1], 2)
    print([a(n) for n in range(1, 48)]) # Michael S. Branicky, Dec 07 2021

Extensions

More terms from Rémy Sigrist, Sep 20 2018
Showing 1-1 of 1 results.