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.

A241539 Smallest k>=1 such that the n-th semiprime + or - k are both primes, or a(n)=0 if there is no such k.

Original entry on oeis.org

1, 1, 2, 3, 3, 2, 2, 9, 6, 3, 4, 3, 6, 9, 2, 15, 12, 8, 12, 4, 15, 9, 6, 2, 15, 6, 15, 12, 3, 14, 12, 4, 15, 6, 3, 2, 12, 9, 12, 18, 9, 14, 2, 6, 3, 10, 15, 6, 6, 33, 18, 9, 8, 12, 15, 12, 4, 15, 10, 6, 6, 3, 10, 9, 24, 6, 27, 18, 14, 15, 18, 6, 21, 8, 30, 3
Offset: 1

Views

Author

Vladimir Shevelev, Apr 25 2014

Keywords

Comments

If the sequence has no zeros at least for sufficiently large n, then one can believe that, for a pair of sufficiently large semiprimes of the same parity {r,s}, there is a number k=k(r,s) such that either {r-k, s+k} or {r+k, s-k} is a pair of primes. Then, if a representation 2*n = r+s with, say, min{r,s} > log(n) is considered, then, at least for sufficiently large n, it is reduced to the Goldbach representation 2*n = p+q with primes p,q. It is natural to think that a Goldbach-like conjecture that at least every sufficiently large even number is a sum of two semiprimes could be proved more easily than the classic Goldbach conjecture (cf. Chen's theorem).

Crossrefs

Programs

  • Mathematica
    sk[s_]:=Module[{k=1},While[!PrimeQ[s+k]||!PrimeQ[s-k],k++];k]; sk/@Select[Range[300],PrimeOmega[#]==2&] (* Harvey P. Dale, Jun 07 2025 *)
  • PARI
    list(lim) = my(v=List(), t); forprime(p=2, sqrt(lim), t=p; forprime(q=p, lim\t, listput(v, t*q))); vecsort(Vec(v)) \\ From A001358
    sp = list(1000); vector(#sp, n, k=1; while(!isprime(sp[n]+k) || !isprime(sp[n]-k), k++); k) \\ Colin Barker, May 31 2014

Extensions

More terms from Peter J. C. Moses, Apr 28 2014