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.

A121884 Excess of n-th semiprime over previous prime.

Original entry on oeis.org

1, 1, 2, 3, 1, 2, 2, 3, 2, 3, 2, 3, 4, 1, 2, 3, 2, 4, 2, 4, 5, 1, 4, 2, 1, 4, 3, 2, 3, 4, 2, 4, 5, 6, 3, 2, 2, 5, 6, 8, 9, 10, 2, 2, 3, 2, 3, 4, 6, 7, 4, 1, 2, 4, 3, 2, 4, 5, 2, 4, 6, 1, 2, 3, 4, 6, 7, 10, 2, 3, 4, 6, 7, 8, 10, 3, 2, 4, 6, 8, 2, 3, 2, 5, 2, 4, 3, 1, 4, 6, 8, 2, 5, 6, 8, 9, 10, 12, 2, 1, 2, 4, 6
Offset: 1

Views

Author

Jonathan Vos Post, Aug 31 2006

Keywords

Comments

a(n) = 1 iff n is in A077068. a(n) = 2 iff n is in A062721.

Crossrefs

Programs

  • Mathematica
    semiPrimeQ[n_] := Plus @@ Last /@ FactorInteger[n] == 2; lst1 = Select[ Range@ 325, semiPrimeQ@# &]; lst = Select[ Range@ 500, semiPrimeQ@# &]; lst - (NextPrime[ #, -1] & /@ lst) (* Robert G. Wilson v, Mar 16 2009 *)
    #-NextPrime[#,-1]&/@Select[Range[400],PrimeOmega[#]==2&] (* Harvey P. Dale, Feb 15 2018 *)

Formula

a(n) = Min{A001358(n)-p for p < A001358(n) and p in A000040(k)}.

Extensions

a(31)-a(103) from Robert G. Wilson v, Mar 16 2009