OFFSET
1,1
COMMENTS
According to the conjecture at A234961, the limiting relative density of these primes is 1.
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..7000
MATHEMATICA
t = NestList[DeleteDuplicates[Flatten[Map[{#, NextPrime[2 #, -1], NextPrime[2 #, 1]} &, #]]] &, {2}, 12]; Complement[Map[Prime, Range[PrimePi[Last[#]]]], #] &[Last[t]] (* Peter J. C. Moses, Dec 30 2013 *)
PROG
(Python)
from sympy import prevprime, nextprime, primerange
def aupto(limit):
reach, expand = {2}, [2]
while True:
newreach = set()
while len(expand) > 0:
p = expand.pop()
for q in prevprime(2*p), nextprime(2*p):
if q not in reach:
newreach.add(q)
reach |= newreach
expand = list(newreach)
if prevprime(2*min(expand)) > limit:
in_tree = set(r for r in reach if r <= limit)
return sorted(set(primerange(1, limit+1)) - in_tree)
print(aupto(881)) # Michael S. Branicky, Jul 24 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Jan 01 2014
STATUS
approved