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).

This page as a plain text file.
%I A200927 #14 Sep 18 2015 04:29:37
%S A200927 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,
%T A200927 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,
%U A200927 5,5,0,3,3,0,5,5,5,5,0,3,3,0,0,0,4,4,4
%N A200927 Difference between (least semiprime >= n) and (largest semiprime <= n).
%C A200927 a(n) = 0 if and only if n is semiprime.
%H A200927 Arkadiusz Wesolowski, <a href="/A200927/b200927.txt">Table of n, a(n) for n = 4..10000</a>
%p A200927 A106325 := proc(n)
%p A200927     for a from n do
%p A200927         if numtheory[bigomega](a) = 2 then
%p A200927             return a;
%p A200927         end if;
%p A200927     end do:
%p A200927 end proc;
%p A200927 prevSpr := proc(n)
%p A200927     for a from n by -1 do
%p A200927         if numtheory[bigomega](a) = 2 then
%p A200927             return a;
%p A200927         end if;
%p A200927     end do:
%p A200927 end proc;
%p A200927 A200927 := proc(n)
%p A200927     A106325(n)-prevSpr(n) ;
%p A200927 end proc:
%p A200927 seq(A200927(n),n=4..80) ; # _R. J. Mathar_, Nov 26 2011
%t A200927 Table[a = b = 0; While[! PrimeOmega[n - a] == 2, a++]; While[! PrimeOmega[n + b] == 2, b++]; a + b, {n, 4, 100}]
%Y A200927 Cf. A001358, A065516.
%K A200927 nonn
%O A200927 4,2
%A A200927 _Arkadiusz Wesolowski_, Nov 24 2011