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

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 60th year, we have over 367,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
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
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
Sequence in context: A319396 A049237 A162361 * A073855 A306312 A350065
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 5 08:13 EST 2023. Contains 367575 sequences. (Running on oeis4.)