|
|
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.
|
|
1
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
PROG
|
(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)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|