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.
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
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..10000
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
Comments