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.

This page as a plain text file.
%I A241539 #35 Jun 07 2025 15:01:01
%S A241539 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,
%T A241539 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,
%U A241539 15,10,6,6,3,10,9,24,6,27,18,14,15,18,6,21,8,30,3
%N 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.
%C A241539 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).
%H A241539 Harvey P. Dale, <a href="/A241539/b241539.txt">Table of n, a(n) for n = 1..1000</a>
%H A241539 Wikipedia, <a href="http://en.wikipedia.org/wiki/Chen&#39;s_theorem">Chen's theorem</a>
%t A241539 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 *)
%o A241539 (PARI)
%o A241539 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
%o A241539 sp = list(1000); vector(#sp, n, k=1; while(!isprime(sp[n]+k) || !isprime(sp[n]-k), k++); k) \\ _Colin Barker_, May 31 2014
%Y A241539 Cf. A001358, A241531, A241533, A241535, A241536.
%K A241539 nonn
%O A241539 1,3
%A A241539 _Vladimir Shevelev_, Apr 25 2014
%E A241539 More terms from _Peter J. C. Moses_, Apr 28 2014