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

A088700 Number of primes between successive semiprimes.

Original entry on oeis.org

1, 1, 0, 2, 0, 2, 0, 1, 0, 2, 0, 0, 1, 0, 2, 1, 0, 1, 0, 0, 2, 0, 1, 2, 0, 1, 1, 0, 0, 1, 0, 0, 0, 3, 2, 1, 0, 0, 0, 0, 0, 1, 1, 0, 2, 0, 0, 0, 0, 2, 1, 0, 0, 1, 1, 1, 0, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 3, 0, 2, 0, 1, 0, 1, 0, 1, 0, 2, 1, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 2, 1, 0, 0
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 08 2003

Keywords

Comments

a(n) = 0 for almost all n. The average order of a(n) is 1/log log n. - Charles R Greathouse IV, Apr 29 2012

Examples

			a(34)=3, as there are three primes between A001358(34)=19*5=95 and A001358(34+1)=53*2=106: 97, 101 and 103.
		

Crossrefs

Cf. A001358, (semiprimes), A088701, A103668 (semiprimes between primes).
Cf. A214520 (primes that are the only prime between consecutive semiprimes).

Programs

  • Mathematica
    Select[Range[400], PrimeOmega[#] == 2&] // PrimePi // Differences (* Jean-François Alcover, Oct 12 2021 *)

Formula

a(n) = A000720(A001358(n+1)) - A000720(A001358(n));
a(A088701(n)) = n and a(k) <> n for 1 <= k < A088701(n).

A088701 Smallest semiprime such that n primes will follow until the next semiprime.

Original entry on oeis.org

9, 4, 10, 95, 818, 2681, 16053, 35981, 797542, 1069541, 340894, 6974465, 3586843, 2070050198, 5238280946, 14499777101, 2601693504238, 7472089131123
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 08 2003

Keywords

Comments

Is this sequence infinite? - David A. Corneth, Aug 17 2018

Crossrefs

Cf. A214520 (primes that are the only prime between consecutive semiprimes).

Programs

  • Mathematica
    om = Array[PrimeOmega, 1100000]; sp = Flatten@ Position[om, 2]; Table[ sp[[ SelectFirst[ Range[Length[sp] - 1], Count[Take[om, {sp[[#]], sp[[# + 1]]}], x_ /; x == 1] == j &, 0]]], {j, 0, 10}] (* Giovanni Resta, Aug 16 2018 *)
  • Perl
    use ntheory ":all";
    my($l,$nextn,@C)=(4,0);
    forcomposites {
      if (is_semiprime($_)) {
        my $c = prime_count($l+1,$_-1);
        if (!defined $C[$c]) {
          $C[$c] = $l;
          while (defined $C[$nextn]) { print "$nextn $C[$nextn]\n"; $nextn++; }
        }
        $l = $_;
      }
    } 5,1e7;  # Dana Jacobsen, Aug 16 2018

Formula

A088700(a(n)) = n and A088700(k) <> n for 1 <= k < a(n).

Extensions

a(11)-a(15) from Donovan Johnson, Mar 14 2010
a(16) from Giovanni Resta, Aug 17 2018
a(17) from Giovanni Resta, Aug 18 2018
Showing 1-2 of 2 results.