## Dirichlet generating functions

Suppose $f(n)$ is a function defined for positive integers $n \geq 1$. Then we can define an infinite series $\zeta_f(s)$ as follows: $\displaystyle \begin{array}{rcl}\zeta_f(s) &=& \displaystyle \frac{f(1)}{1^s} + \frac{f(2)}{2^s} + \frac{f(3)}{3^s} + \dots + \frac{f(n)}{n^s} + \dots \\[1em] &=& \displaystyle \sum_{n \geq 1} \frac{f(n)}{n^s} \end{array}$

(This might look a bit strange, but bear with me!) For example, suppose $f(n) = n+2$ for all $n$. Then $\displaystyle \zeta_f(3) = \displaystyle \frac{1+2}{1^3} + \frac{2+2}{2^3} + \frac{3+2}{3^3} + \frac{4+2}{4^3} + \dots \approx 4.0490\dots$

(Note that in this case, with $s = 3$, the infinite sum converges; but often we just use $s$ as a formal placeholder and don’t particularly care about convergence. That is, $\zeta_f$ is perfectly well defined as an infinite series without worrying about the value of $s$.)

In fact $\zeta_f$ is called the Dirichlet generating function for $f$. Of course, this name should remind you of Dirichlet convolution—and it’s no coincidence; Dirichlet convolution and Dirichlet generating functions are closely related. Let’s see how.

Suppose we have two functions $f(n)$ and $g(n)$, and consider multiplying their Dirichlet generating functions (with plain old, regular multiplication): $\displaystyle \zeta_f(s) \zeta_g(s) = \displaystyle \left( \sum_{n \geq 1} \frac{f(n)}{n^s} \right) \left( \sum_{n \geq 1} \frac{g(n)}{n^s} \right)$

We have a big (well, infinite) sum of things multiplied by another big sum. By distributivity, we’re going to get a big sum as a result, where each term of the resulting sum is the product of one thing chosen from the left-hand sum and one thing chosen from the right-hand sum. (This is just like FOIL, only way cooler and more infinite-r.) That is, the resulting sum is going to look something like this: $\displaystyle \displaystyle \zeta_f(s) \zeta_g(s) = \dots + \frac{f(a)}{a^s} \frac{g(b)}{b^s} + \dots = \sum_{a,b \geq 1} \frac{f(a)}{a^s} \frac{g(b)}{b^s}$

with one term for every possible choice of $a$ and $b$. The $a^s b^s$ in the denominator is of course equal to $(ab)^s$, and we can collect up all the fractions with the same denominator: for each $n$, we will get a denominator of $n^s$ in each case where we pick some $a$ and $b$ whose product is $n$. So we can reorganize the terms in the above sum, grouping together all the terms where the product of $a$ and $b$ is the same, and rewrite it like this (is this starting to look familiar…?): $\displaystyle \displaystyle \zeta_f(s) \zeta_g(s) = \sum_{n \geq 1} \sum_{ab = n} \frac{f(a) g(b)}{n^s}$

Now we can factor out the $1/n^s$ (since it doesn’t depend on $a$ or $b$), like so: $\displaystyle \displaystyle \zeta_f(s) \zeta_g(s) = \sum_{n \geq 1} \frac{1}{n^s} \sum_{ab = n} f(a) g(b)$

But the inner sum is now just the definition of the Dirichlet convolution of $f$ and $g$! So the whole thing becomes $\displaystyle \displaystyle \zeta_f(s) \zeta_g(s) = \sum_{n \geq 1} \frac{1}{n^s} \sum_{ab = n} f(a) g(b) = \sum_{n \geq 1} \frac{(f \ast g)(n)}{n^s}$

And finally, we note that the thing on the right is itself the Dirichlet generating function for $f \ast g$. So in summary, we have shown that $\displaystyle \displaystyle \zeta_f(s) \zeta_g(s) = \zeta_{f \ast g}(s)$

Neato! So in some sense, Dirichlet generating functions “turn Dirichlet convolution into regular multiplication”. Assistant Professor of Computer Science at Hendrix College. Functional programmer, mathematician, teacher, pianist, follower of Jesus.
This entry was posted in number theory and tagged , , , , , , , . Bookmark the permalink.

### 5 Responses to Dirichlet generating functions

1. Rob says:

These functions (with z for s) are used a lot in signal processing, under the name z-transforms. https://en.m.wikipedia.org/wiki/Z-transform

• Brent says:

Hi Rob, thanks for the link! Though after reading about z-transforms I do not think they are the same. Notice that with a z-transform you have something like F(z) = sum_n … z^-n, but with Dirichlet generating functions you have F(s) = sum_n … n^-s . The base and the exponent are switched, which actually makes a very big difference.

2. Brendan says:

Does this make the Dirichlet Generating function operator a monoid homomorphism from the monoid of $(\mathbb{R} \to \mathbb{R}, \lambda f,g . \lambda x . f(x)g(x), \lambda x . 1)$ to the Dirichlet convolution monoid?

• Brent says:

That’s the right idea but I think it’s the other way around.