login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A234962 Primes missing from the tree generated at A234960. 3

%I #13 Jul 25 2022 01:12:12

%S 71,101,109,151,181,191,229,233,239,241,269,283,311,349,367,373,379,

%T 409,419,433,439,461,463,467,479,487,491,569,571,593,599,601,607,643,

%U 647,653,659,683,727,733,739,743,751,757,811,821,823,827,829,857,877,881

%N Primes missing from the tree generated at A234960.

%C According to the conjecture at A234961, the limiting relative density of these primes is 1.

%H Clark Kimberling, <a href="/A234962/b234962.txt">Table of n, a(n) for n = 1..7000</a>

%t 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 *)

%o (Python)

%o from sympy import prevprime, nextprime, primerange

%o def aupto(limit):

%o reach, expand = {2}, [2]

%o while True:

%o newreach = set()

%o while len(expand) > 0:

%o p = expand.pop()

%o for q in prevprime(2*p), nextprime(2*p):

%o if q not in reach:

%o newreach.add(q)

%o reach |= newreach

%o expand = list(newreach)

%o if prevprime(2*min(expand)) > limit:

%o in_tree = set(r for r in reach if r <= limit)

%o return sorted(set(primerange(1, limit+1)) - in_tree)

%o print(aupto(881)) # _Michael S. Branicky_, Jul 24 2022

%Y Cf. A234960, A234961.

%K nonn

%O 1,1

%A _Clark Kimberling_, Jan 01 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)