OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
EXAMPLE
a(6) = 111: 111 (base 2) = 7, which is prime; 111 (base 2+6) = 73, which is prime.
MATHEMATICA
a = {}; Do[ k = 1; While[ ! PrimeQ[FromDigits[IntegerDigits[Prime[k], 2], 2 + n]], k++ ]; AppendTo[a, FromDigits[IntegerDigits[Prime[k], 2], 10]]; , {n, 50}]; a (* Ray Chandler, Jan 10 2005 *)
PROG
(Python)
from sympy import isprime, nextprime
def fd(s, b): return sum(b**i for i, si in enumerate(s[::-1]) if si=='1')
def a(n):
p = 2
while not isprime(fd(bin(p)[2:], n+2)): p = nextprime(p)
return int(bin(p)[2:])
print([a(n) for n in range(1, 55)]) # Michael S. Branicky, Aug 20 2022
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Ray G. Opao, Jan 05 2005
EXTENSIONS
Corrected and extended by Ray Chandler, Jan 10 2005
a(51) and beyond from Michael S. Branicky, Aug 09 2022
STATUS
approved