

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;


LINKS



FORMULA



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

(Haskell)
a171135 n = head [p  p < a000040_list, let x = p + 2 * n,
a064911 x == 1  a010051' x == 1]


CROSSREFS



KEYWORD

nonn


AUTHOR



STATUS

approved



