login
Number of composites between successive values of A014612.
3

%I #11 Oct 26 2023 12:28:12

%S 2,3,0,5,0,0,8,0,0,3,1,7,2,0,1,2,0,1,10,4,0,1,1,2,2,1,0,6,0,3,5,7,0,2,

%T 0,7,0,3,0,0,0,0,4,3,1,1,2,9,3,9,4,0,3,1,1,1,0,0,7,1,2,3,1,2,1,2,1,0,

%U 0,0,3,1

%N Number of composites between successive values of A014612.

%F a(n) <= A114403(n) - 1.

%e a(1) = 2 because there are two composites {9,10} between A014612(1)=8 and A014612(2)=12.

%e a(2) = 3 because there are two composites {14, 15, 16} between A014612(2)=12 and A014612(3)=18.

%e a(3) = 0 because there are no composites between A014612(3)=18 and A014612(4)=20, only the prime 19.

%e a(7) = 8 because {32,33,34,35,36,38,39,40} between A014612(7)=30 and A014612(8)=42.

%p isA014612 :=proc(n) if numtheory[bigomega](n) = 3 then true ; else false ; fi ; end: isA002808 := proc(n) RETURN(not isprime(n) and n <> 1 ); end: A126436 := proc(nmax) local a ; a := -1 ; for n from 1 to nmax do if isA014612(n) then if a >= 0 then printf("%d,",a) ; fi ; a := 0 ; elif isA002808(n) and a>= 0 then a := a+1 ; fi ; od : end: A126436(300) : # _R. J. Mathar_, Apr 03 2007

%t nmax = 72;

%t S = Select[Range[300](* increase range if a(n) unevaluated *), PrimeOmega[#] == 3&];

%t a[n_ /; n+1 <= Length[S]] := Count[Range[S[[n]]+1, S[[n+1]]-1], _?CompositeQ];

%t Table[a[n], {n, 1, nmax}] (* _Jean-François Alcover_, Oct 26 2023 *)

%Y 3-almost prime analog of A046933 = number of composites between successive primes.

%Y Cf. A002808, A014612, A046933, A070552, A114403.

%K easy,nonn

%O 1,1

%A _Jonathan Vos Post_, Mar 12 2007

%E More terms from _R. J. Mathar_, Apr 03 2007