OFFSET
0,2
COMMENTS
The number of terms in A116998 that have exactly n distinct prime factors.
A116998 is the sequence of integers k for which the number of distinct prime factors, A001221(k), and the number of unitary divisors, A034444(k) = 2^A001221(k), are nondecreasing. Note that A001221(k) increases by 1 and A034444(k) doubles, whenever k is a primorial number (A002110). A116998 is analogous to Ramanujan's largely composite numbers (A067128), while A002110 is analogous to highly composite numbers (A002182), and this sequence is analogous to A308530.
LINKS
EXAMPLE
n | a(n) | primorial(n+1) | integers k < primorial(n+1) with omega(k) = n
--+------+----------------+----------------------------------------------
0 | 1 | 2 | 1
1 | 4 | 6 | 2, 3, 4, 5
2 | 12 | 30 | 6, 10, 12, 14, 15, 18, 20, 21, 22, 24, 26, 28
MATHEMATICA
a[n_] := Module[{p2, maxp, pr, f}, p2 = Product[Prime[i], {i, 1, n + 1}]; maxp = Prime[n]*Prime[n+1]; pr = Prime[Range[PrimePi[maxp]]]; f[e_, lim_, ind_, v_] := f[e, lim, ind, v] = Module[{c = 0, i = ind, p, temp, minr}, If[e == 1, If[Floor[lim/v] < pr[[ind]], 0, PrimePi[Floor[lim/v]] - ind + 1], While[i <= Length[pr] && v * (p = pr[[i]]) * (minr = p^(e-1)) <= lim, temp = v*p; While[temp * minr <= lim, c += f[e-1, lim, i+1, temp]; temp *= p]; i++]; c]]; f[n, p2, 1, 1] + 1]; Array[a, 15, 0]
PROG
(PARI) a(n) = {my(p1 = vecprod(primes(n)), p2 = p1 * prime(n+1), c = 1); for(k = p1+1, p2-1, if(omega(k) == n, c++)); c; }
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Jan 30 2026
STATUS
approved
