login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A200927 Difference between (least semiprime >= n) and (largest semiprime <= n). 1

%I #14 Sep 18 2015 04:29:37

%S 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 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 5,5,0,3,3,0,5,5,5,5,0,3,3,0,0,0,4,4,4

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

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

%H Arkadiusz Wesolowski, <a href="/A200927/b200927.txt">Table of n, a(n) for n = 4..10000</a>

%p A106325 := proc(n)

%p for a from n do

%p if numtheory[bigomega](a) = 2 then

%p return a;

%p end if;

%p end do:

%p end proc;

%p prevSpr := proc(n)

%p for a from n by -1 do

%p if numtheory[bigomega](a) = 2 then

%p return a;

%p end if;

%p end do:

%p end proc;

%p A200927 := proc(n)

%p A106325(n)-prevSpr(n) ;

%p end proc:

%p seq(A200927(n),n=4..80) ; # _R. J. Mathar_, Nov 26 2011

%t Table[a = b = 0; While[! PrimeOmega[n - a] == 2, a++]; While[! PrimeOmega[n + b] == 2, b++]; a + b, {n, 4, 100}]

%Y Cf. A001358, A065516.

%K nonn

%O 4,2

%A _Arkadiusz Wesolowski_, Nov 24 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 00:30 EDT 2024. Contains 371917 sequences. (Running on oeis4.)