login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

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

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

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

LINKS

R. Zumkeller, Table of n, a(n) for n = 1..10000

Eric Weisstein's World of Mathematics, Chen Prime

Wikipedia, Chen prime

FORMULA

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

MATHEMATICA

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

PROG

(PARI) a(n)=forprime(p=2, , if(bigomega(p+2*n)<3, return(p))) \\ Charles R Greathouse IV, Oct 21 2014

(Haskell)

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

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

-- Reinhard Zumkeller, Oct 21 2014

CROSSREFS

Cf. A171136, A171137.

Cf. A000040, A010051, A064911.

Sequence in context: A319396 A049237 A162361 * A073855 A306312 A077982

Adjacent sequences:  A171132 A171133 A171134 * A171136 A171137 A171138

KEYWORD

nonn

AUTHOR

Reinhard Zumkeller, Dec 04 2009

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 21 23:34 EDT 2021. Contains 348160 sequences. (Running on oeis4.)