OFFSET
1,1
COMMENTS
This sequence is indeed infinite, as we need infinitely many terms to cover the primes with arbitrarily large runs of 0's in their base-2 representation. - Jeffrey Shallit, Mar 07 2021
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
PROG
(Haskell)
a090422 n = a090422_list !! (n-1)
a090422_list = filter ((== 1) . a090418 . fromInteger) a000040_list
-- Reinhard Zumkeller, Aug 07 2012
(Python)
from sympy import isprime, primerange
def ok(p):
b = bin(p)[2:]
for i in range(2, len(b)-1):
if isprime(int(b[:i], 2)) and b[i] != '0':
if isprime(int(b[i:], 2)) or not ok(int(b[i:], 2)): return False
return True
def aupto(lim): return [p for p in primerange(2, lim+1) if ok(p)]
print(aupto(593)) # Michael S. Branicky, Mar 07 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Nov 30 2003
EXTENSIONS
Based on corrections in A090418, data recomputed by Reinhard Zumkeller, Aug 07 2012
STATUS
approved