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!)
A171135 Smallest prime p such that p + 2n is prime or semiprime. 3

%I #14 Sep 25 2018 20:03:52

%S 2,2,3,2,3,2,3,3,3,2,3,2,3,3,3,2,3,2,3,3,5,2,3,3,3,3,3,2,3,2,3,3,3,3,

%T 3,2,3,3,5,2,3,2,3,3,3,2,3,5,3,3,5,2,3,3,3,3,5,2,3,2,5,3,3,3,3,2,3,3,

%U 3,2,3,2,3,3,5,3,3,2,3,3,5,2,3,5,3,5,3,2,3,3,3,3,5,3,3,2,3,3,3,2,3,2,3,3,3

%N Smallest prime p such that p + 2n is prime or semiprime.

%C For any even integer h, there exist infinitely many primes p such that p+h is either a prime or a semiprime;

%C A171136(n) = a(n) + 2*n;

%C a(A171137(n))=A000040(n) and a(m)<>A000040(n) for m < A171137(n).

%H R. Zumkeller, <a href="/A171135/b171135.txt">Table of n, a(n) for n = 1..10000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/ChenPrime.html">Chen Prime</a>

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Chen_prime">Chen prime</a>

%F A010051(a(n)) * (A010051(a(n)+2*n) + A064911(a(n)+2*n)) = 1.

%t spp[n_]:=Module[{p=2},While[PrimeOmega[p+2n]>2,p=NextPrime[p]];p]; Array[ spp,120] (* _Harvey P. Dale_, Sep 25 2018 *)

%o (PARI) a(n)=forprime(p=2,,if(bigomega(p+2*n)<3, return(p))) \\ _Charles R Greathouse IV_, Oct 21 2014

%o (Haskell)

%o a171135 n = head [p | p <- a000040_list, let x = p + 2 * n,

%o a064911 x == 1 || a010051' x == 1]

%o -- _Reinhard Zumkeller_, Oct 21 2014

%Y Cf. A171136, A171137.

%Y Cf. A000040, A010051, A064911.

%K nonn

%O 1,1

%A _Reinhard Zumkeller_, Dec 04 2009

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 March 29 02:23 EDT 2024. Contains 371264 sequences. (Running on oeis4.)