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.

A200927 Difference between (least semiprime >= n) and (largest semiprime <= n).

Original entry on oeis.org

0, 2, 0, 3, 3, 0, 0, 4, 4, 4, 0, 0, 6, 6, 6, 6, 6, 0, 0, 3, 3, 0, 0, 7, 7, 7, 7, 7, 7, 0, 0, 0, 3, 3, 0, 0, 7, 7, 7, 7, 7, 7, 0, 3, 3, 0, 2, 0, 4, 4, 4, 0, 2, 0, 0, 4, 4, 4, 0, 3, 3, 0, 4, 4, 4, 0, 5, 5, 5, 5, 0, 3, 3, 0, 5, 5, 5, 5, 0, 3, 3, 0, 0, 0, 4, 4, 4
Offset: 4

Views

Author

Arkadiusz Wesolowski, Nov 24 2011

Keywords

Comments

a(n) = 0 if and only if n is semiprime.

Crossrefs

Programs

  • Maple
    A106325 := proc(n)
        for a from n do
            if numtheory[bigomega](a) = 2 then
                return a;
            end if;
        end do:
    end proc;
    prevSpr := proc(n)
        for a from n by -1 do
            if numtheory[bigomega](a) = 2 then
                return a;
            end if;
        end do:
    end proc;
    A200927 := proc(n)
        A106325(n)-prevSpr(n) ;
    end proc:
    seq(A200927(n),n=4..80) ; # R. J. Mathar, Nov 26 2011
  • Mathematica
    Table[a = b = 0; While[! PrimeOmega[n - a] == 2, a++]; While[! PrimeOmega[n + b] == 2, b++]; a + b, {n, 4, 100}]