login
Number of composite numbers between the smallest primes that surround n# and n#+n. n# = n primorial = product of primes <= n.
1

%I #7 Aug 03 2014 16:26:28

%S 1,4,6,22,22,17,47,45,79,101,138,119,71,135,173,131,167,197,189,229,

%T 175,233,285,101,353,363,335,277,485,441,385,407,1031,519,307,363,611,

%U 477,431,381,421,605,525,1343,605,1229

%N Number of composite numbers between the smallest primes that surround n# and n#+n. n# = n primorial = product of primes <= n.

%H Harvey P. Dale, <a href="/A088228/b088228.txt">Table of n, a(n) for n = 2..200</a>

%t Count[#,_?CompositeQ]&/@(Module[{pr=Prime[Range[50]]},Range[ NextPrime[ Last[#],-1]+1,NextPrime[Total[#]]-1]&/@Thread[{pr,Rest[ FoldList[ Times,1,pr]]}]]) (* _Harvey P. Dale_, Aug 03 2014 *)

%o (PARI) primorialgaps(m) = { forprime(n=2,m, c=0; np=primorial(n); for(x=precprime(np),nextprime(np+n),if(!isprime(x),c++)); print1(c",") ) } primorial(k) = { p=1; forprime(z=1,k,p*=z); return(p) }

%K nonn

%O 2,2

%A _Cino Hilliard_, Nov 04 2003