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-1 of 1 results.

A241658 Smallest semiprime, sp, such that n - sp is a semiprime, or a(n)=0 if there is no such sp.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 4, 0, 4, 0, 6, 4, 4, 6, 6, 0, 4, 4, 6, 6, 0, 9, 9, 4, 4, 6, 6, 4, 4, 6, 6, 0, 9, 9, 10, 4, 4, 4, 6, 6, 4, 4, 6, 6, 21, 9, 9, 10, 4, 25, 6, 4, 15, 4, 10, 6, 9, 4, 9, 4, 4, 6, 6, 10, 4, 9, 6, 4, 15, 6, 10, 4, 9, 6, 14, 15, 4, 10, 6, 4, 25, 6, 10, 34, 4, 10, 6, 4, 4
Offset: 1

Views

Author

Keywords

Comments

Conjecture: every number greater than 33 is a sum of two semiprimes. Only 1, 2, 3, 4, 5, 6, 7, 9, 11, 17, 22 & 33 cannot be so represented.
If n is prime, then a(2n) must be either 4 or an odd semiprime. See A241535.
First occurrence of the k-th semiprime (A001358): 8, 12, 23, 36, 76, 54, 46, 113, 51, 185, 254, 85, 294, 1881, 378, 1035, 1514, 634, 1509, 3550, 1621, 2713, 4050, 14788, 1485, 26839, 1497, 22694, 11965, 15334, 15810, 30894, 2721, 16849, ..., .

Examples

			a(23) = 9 because 23 = 9 + 14, two semiprimes.
		

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[{sp = 4}, While[ PrimeOmega[n - sp] != 2, sp = NextSemiPrime[sp]]; If[n > sp, sp, 0]]; Array[ f, 90]
  • PARI
    a(n) = {for (k=4, n-4, if ((bigomega(k) ==2) && (bigomega(n-k) == 2), return (k));); return (0);} \\ Michel Marcus, Jun 12 2014
Showing 1-1 of 1 results.