login
A108197
Number of composite numbers between two successive semiprimes.
2
0, 1, 0, 1, 0, 3, 0, 1, 0, 4, 0, 0, 1, 0, 4, 1, 1, 2, 1, 0, 1, 2, 2, 2, 2, 3, 1, 0, 0, 2, 1, 0, 0, 7, 2, 2, 2, 0, 1, 0, 0, 4, 2, 0, 4, 0, 0, 1, 0, 6, 1, 0, 1, 3, 1, 6, 0, 2, 1, 1, 4, 4, 0, 0, 1, 0, 2, 2, 0, 0, 1, 0, 0, 1, 3, 5, 1, 7, 1, 2, 0, 3, 2, 1, 1, 4, 2, 6, 1, 1, 2, 2, 0, 1, 0, 0, 1, 2, 2, 3, 1, 1, 2, 0, 1
OFFSET
1,6
COMMENTS
This is to A046933 as semiprimes A001358 are to primes A000040. This is to composites A002808 as A088700 is to primes. a(A070552(i)) = 0. - Jonathan Vos Post, Oct 10 2007
a(n) = 0 if A001358(n) is in A070552. - Jonathan Vos Post, Mar 11 2007
FORMULA
a(n) = A065855(A001358(n+1)) - A065855(A001358(n)) - 1. - R. J. Mathar, Oct 23 2007
a(n)=A065516(n)-1-A088700(n). - R. J. Mathar, Jul 31 2008
EXAMPLE
a(1) = 0 because between 2*2 and 2*3 there is 5 and it is not composite.
a(2) = 1 because between 2*3 and 3*3 there is 8 = 2*2*2;
a(6) = 3 because between 3*5 and 3*7 there are three composite numbers: {16, 18, 20}.
a(10) = 4 because between 2*13 and 3*11 there are four composite numbers: {27, 28, 30, 32}.
a(15) = 4 because there are four composites {40,42,44,45} between semiprime(15)=39 and semiprime(16)=46.
MAPLE
with(numtheory): sp:=proc(n) if bigomega(n)=2 then n else fi end: SP:=[seq(sp(n), n=1..450)]: for j from 1 to nops(SP)-1 do ct:=0: for i from SP[j]+1 to SP[j+1]-1 do if isprime(i)=false then ct:=ct+1 else ct:=ct fi: od: a[j]:=ct: od:seq(a[j], j=1..nops(SP)-1); # Emeric Deutsch, Mar 30 2007
A001358 := proc(nmin) local a, n ; a :=[] ; n := 1 ; while nops(a) < nmin do if numtheory[bigomega](n) = 2 then a := [op(a), n] ; fi ; n := n+1 ; od: RETURN(a) ; end: A000720 := proc(n) numtheory[pi](n) ; end: A065855 := proc(n) n-A000720(n)-1 ; end: A108197 := proc(nmin) local a, n, a001358 ; a001358 := A001358(nmin+1) ; a := [] ; for n from 1 to nops(a001358)-1 do a := [op(a), A065855(op(n+1, a001358))-A065855(op(n, a001358))-1 ] ; od; RETURN(a) ; end: A108197(100) ; # R. J. Mathar, Oct 23 2007
MATHEMATICA
terms = 105;
cc = Select[Range[4 terms], CompositeQ] /. c_ /; PrimeOmega[c] == 2 -> 0;
SequenceReplace[cc, {0, c___ /; FreeQ[{c}, 0]} :> Length[{c}]][[;; terms]] (* Jean-François Alcover, Mar 31 2020 *)
CROSSREFS
Semiprime analog of A046933.
Sequence in context: A238342 A123878 A284148 * A318455 A363029 A049769
KEYWORD
easy,nonn
AUTHOR
Giovanni Teofilatto, Jun 15 2005
EXTENSIONS
Corrected and extended by Ray Chandler, Jul 07 2005
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Jul 13 2007
Further edited by N. J. A. Sloane at the suggestion of R. J. Mathar, Jul 01 2008
STATUS
approved