# Computing an infinite sum

I wish to compute $$\sum_{n=1}^{\infty} f(n)e^{-nz}$$ where $$f(n)= |\{(a,b,c)| abc=n\}|$$ and $$z>0$$. Its easy to compute that if $$n = \prod p_{i}^{\alpha_i}$$ where $$p_i$$ are distinct primes then $$f(n)= \prod \binom{\alpha_i+2}{2}$$ For instance $$6=2\times 3$$ and we can check that the set is $$\{(1,2,3),(1,3,2),(2,1,3),(2,3,1),(3,1,2),(3,2,1),(6,1,1),(1,6,1),(1,1,6)\}$$ and so $$f(6)=9$$. I am a novice to mathematica, can anyone help me figure out how I should compute this on mathematica. Your help will be appreciated.

Edit: As suggested by J. M., I put the code Sum[DivisorSigma[0, n] Exp[-nz]/(1 - Exp[-nz]), {n, 1, ∞}], but Mathematica gives same sum as output.

• Welcome to Mathematica.SE! I hope you will become a regular contributor. To get started, 1) take the introductory tour now, 2) when you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge, 3) remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign, and 4) give help too, by answering questions in your areas of expertise. Dec 13, 2021 at 15:11
• I do not understand your syntax: f(n)=|{(a,b,c)|abc=n}| However, note: if we call the z-transform of f: fz, then your sum is: sum= fx[Exp[z]]-f[0]. fz can be obtained from the function ZTransform Dec 13, 2021 at 15:19
• It would be super helpful if you unpacked the math notation for me. Express it in words perhaps. For instance, I am not sure what operation the curly brace in $f(n)$ indicates. A list of the three values? Something else? Dec 13, 2021 at 15:19
• Are you aware that your sum can be expressed as a Lambert series? With[{q = Exp[-z]}, Sum[DivisorSigma[0, n] q^(n - 1)/(1 - q^n), {n, 1, ∞}] - 1] Dec 13, 2021 at 15:22
• Right, Mathematica is not aware of a closed form for the Lambert series I gave. Thus, you need to evaluate numerically with e.g. NSum[]. Dec 13, 2021 at 16:07

(This got too long for a comment.)

What the OP calls $$f(n)$$ counts what could be called a $$3$$-multiplicative partition of $$n$$. This is sometimes referred to in the literature as a Piltz function of order $$3$$ (see e.g. this paper).

In particular, the OEIS gives a convenient formula for the $$3$$-Piltz function:

$$f(n)=\tau_3(n)=\sum_{d \mid n} \sigma_0(d)$$

where $$\sigma_0(n)$$ counts the number of divisors of $$n$$, and is implemented in Mathematica as DivisorSigma[0, n]. This is then summed all over the divisors $$d$$ of $$n$$.

In fact, this sum over all divisors can be alternately expressed as a Dirichlet convolution (see my previous discussion here): DirichletConvolve[DivisorSigma[0, k], 1, k, n].

On the other hand, one might notice the following discrepancy:

With[{n = 1},
{Apply[Times, Binomial[FactorInteger[n][[All, 2]] + 2, 2]],
DirichletConvolve[DivisorSigma[0, k], 1, k, n]}]
{3, 1}


which can lead to different results depending on which form is used. To make things easy for myself, I will continue with the second representation.

As is customary, I let $$q=\exp(-z)$$ and consider the generating function

$$\sum_{n=1}^\infty \tau_3(n)q^n$$

An important identity that can be exploited here relates normal generating functions and so-called Lambert series:

$$\sum_{n=1}^\infty c_n q^n=\sum_{n=1}^\infty a_n \frac{q^n}{1-q^n}\quad\text{if}\quad c_n=\sum_{d \mid n} a_d$$

which means the generating function of $$\tau_3(n)$$ can be expressed as the Lambert series

$$\sum_{n=1}^\infty \sigma_0(n) \frac{q^n}{1-q^n}$$

(I mentioned the discrepancy between the two different versions of $$\tau_3(n)$$ earlier; one only needs to add or subtract a $$2q$$ term as needed.)

Some limited numerical experiments I did suggest that the Lambert form is more tractable than the OP's original generating function form, especially for small $$q$$ (corresponding to large $$z$$); perhaps someone with more time and inclination than me can do more detailed comparisons.