Let Ω(n) and ω(n) denote the number of distinct prime factors of the positive integer n, counted respectively with and without multiplicity. Let $d_k(n)$ denote the Piltz function (which counts the number of ways of writing n as a product of k factors). We obtain a precise estimate of the sum
for a class of multiplicative functions f, including in particular $f(n) = d_k(n)$, unconditionally if 1 ≤ k ≤ 3, and under some reasonable assumptions if k ≥ 4.
The result also applies to f(n) = φ(n)/n (where φ is the totient function), to $f(n) = σ_r(n)/(n^r)$ (where $σ_r$ is the sum of rth powers of divisors) and to functions related to the notion of exponential divisor. It generalizes similar results by J. Wu and Y.-K. Lau when f(n) = 1, respectively $f(n) = d_2(n)$.