A052297 Number of distinct prime factors of all composite numbers between n-th and (n+1)st primes.
0, 1, 2, 3, 2, 4, 2, 5, 5, 3, 6, 5, 3, 5, 6, 7, 3, 7, 6, 2, 8, 4, 8, 9, 5, 3, 6, 2, 6, 14, 5, 8, 3, 11, 3, 9, 7, 6, 8, 8, 3, 13, 2, 6, 3, 14, 15, 5, 3, 7, 9, 3, 11, 8, 9, 9, 3, 9, 6, 3, 13, 16, 7, 3, 6, 16, 8, 13, 3, 6, 9, 10, 9, 9, 6, 8, 11, 6, 12, 14, 4, 14, 2, 10, 7, 8, 11, 6, 4, 6, 16, 10, 6, 13
Offset: 1
Keywords
Examples
n=30, p(30)=113, the next prime is 127. Between them are 13 composites: {114, 115, ..., 126}. Factorizing all and collecting prime factors, the set {2,3,5,7,11,13,17,19,23,29,31,41,59,61} is obtained, consisting of 14 primes, so a(30)=14.
Links
- T. D. Noe, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Length[Union[Flatten[Table[Transpose[FactorInteger[n]][[1]],{n, First[#]+ 1, Last[#]-1}]]]]&/@Partition[Prime[Range[100]],2,1] (* Harvey P. Dale, Jan 19 2012 *)
Comments