cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A243154 Smallest k>=0 such that prime(n)*prime(n+k)-2 is prime.

Original entry on oeis.org

0, 0, 0, 0, 4, 0, 2, 0, 4, 0, 7, 0, 4, 0, 0, 4, 11, 0, 2, 0, 4, 7, 7, 0, 12, 4, 0, 0, 2, 9, 0, 0, 2, 0, 6, 2, 1, 4, 10, 0, 13, 4, 0, 4, 10, 4, 0, 0, 2, 8, 0, 0, 5, 6, 0, 30, 20, 16, 4, 11, 7, 0, 5, 13, 0, 11, 18, 0, 2, 18, 5, 0, 1, 4, 5, 10, 4, 7, 4, 5, 11
Offset: 1

Views

Author

Vladimir Shevelev, May 31 2014

Keywords

Comments

One of the possible illustrations of Chen's theorem: there are infinitely many primes p such that p+2 is semiprime.
For a dual sequence, see A243158.

Crossrefs

Cf. A243158.

Programs

  • Mathematica
    skp[n_]:=Module[{k=0,p=Prime[n]},While[!PrimeQ[p Prime[n+k]-2],k++];k]; Array[skp,90] (* Harvey P. Dale, Aug 15 2021 *)
  • PARI
    vector(1000, n, k=0; while(!isprime(prime(n)*prime(n+k)-2), k++); k) \\ Colin Barker, May 31 2014

Extensions

a(25) corrected and more terms from Colin Barker, May 31 2014