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.

Showing 1-3 of 3 results.

A241535 Smallest semiprime q such that 2*prime(n) - q is semiprime, or a(n)=0 if there is no such q.

Original entry on oeis.org

0, 0, 4, 4, 0, 4, 9, 4, 21, 9, 4, 9, 25, 4, 9, 15, 25, 4, 15, 9, 4, 15, 21, 9, 9, 15, 4, 9, 4, 9, 33, 9, 9, 4, 9, 4, 9, 21, 15, 25, 35, 4, 21, 4, 33, 4, 9, 9, 9, 4, 15, 9, 4, 9, 9, 9, 9, 4, 9, 9, 4, 21, 25, 25, 4, 51, 33, 25, 9, 4, 9, 15, 21, 9, 9, 21, 15, 9, 9, 15, 21, 4, 21, 4
Offset: 1

Views

Author

Vladimir Shevelev, Apr 25 2014

Keywords

Comments

Conjecture: every even semiprime more than 22 is a sum of two semiprimes.
All terms are either 4 or odd.
First occurrence of k-th odd semiprime (A046315): 7, 16, 9, 13, 31, 41, 104, 134, 66, 412, 2769, 447, 1282, 3868, 7003, 3601, 48649, 11016, 5379, 41644, 34575, 83474, 120165, 135566, 21335, 394140, 14899, 876518, 434986, 173914, 691409, 1854580, 3741206, 714807, 1001321, 6427837, 4267513, 14809496, 7795998, 26617567, 2001937, 13958857, 9217135, 18815676, ..., . - Robert G. Wilson v, Apr 26 2014
If a(n) = 4, then 2*prime(n)-4=2*(prime(n)-2) is a semiprime, thus prime(n)-2 is a prime, so prime(n) belongs to A006512 (greater of twin primes). - Michel Marcus, Mar 26 2015

Examples

			Let n=16, then 2*prime(16) = 2*53 = 106. We have 106-4=102, 106-6=100, 106-9=97, 106-10=96, 106-14=92, 106-15=91 and only the last number is semiprime. So a(16)=15.
		

Crossrefs

Programs

  • Mathematica
    NextSemiPrime[n_, k_: 1] := Block[{c = 0, sgn = Sign[k]}, sp = n + sgn; While[c < Abs[k], While[ PrimeOmega[sp] != 2, If[ sgn < 0, sp--, sp++]]; If[ sgn < 0, sp--, sp++]; c++]; sp + If[sgn < 0, 1, -1]]; f[n_] := Block[{p2 = 2 Prime[n], sp = 4}, While[ PrimeOmega[p2 - sp] != 2, sp = NextSemiPrime[sp]]; If[ sp != p2, sp, 0]]; Array[f, 75] (* Robert G. Wilson v, Apr 25 2014 *)

Extensions

More terms from Robert G. Wilson v, Apr 25 2014

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

A241536 Smallest k>=1 such that prime(n)+k and prime(n)-k are both semiprimes, or a(n)=0 if there is no such k.

Original entry on oeis.org

0, 0, 1, 3, 0, 9, 8, 15, 2, 4, 27, 2, 8, 8, 8, 2, 10, 4, 2, 6, 4, 14, 28, 2, 32, 10, 8, 12, 14, 2, 6, 2, 4, 6, 6, 8, 2, 20, 34, 4, 24, 4, 14, 8, 12, 14, 2, 14, 8, 8, 14, 20, 6, 2, 8, 4, 20, 18, 10, 14, 16, 2, 2, 8, 8, 12, 4, 2, 8, 22, 12, 18, 26, 8, 2, 12, 18
Offset: 1

Views

Author

Vladimir Shevelev, Apr 25 2014

Keywords

Comments

If a(n)=2, then prime(n)+2 and prime(n)-2 are both semiprimes; that is, prime(n) belongs to A063643. - Michel Marcus, Mar 26 2015

Crossrefs

Programs

  • Mathematica
    sks[n_]:=Module[{k=1,p=Prime[n]},While[PrimeOmega[p+k]!=2||PrimeOmega[p-k]!=2||p-k<4,If[p-k<3,Break[]];k++];If[p-k<4,0,k]]; Array[sks,80] (* Harvey P. Dale, Dec 09 2016 *)
  • PARI
    a(n) = {p = prime(n); for (k=1, p-1, if ((bigomega(p-k)==2) && (bigomega(p+k) == 2), return (k));); return (0);} \\ Michel Marcus, Apr 25 2014

Extensions

More terms from Michel Marcus, Apr 25 2014
Name edited by Michel Marcus, Mar 26 2015
Showing 1-3 of 3 results.