[proofplan]
We first prove the identity for a finite product over a finite set of primes. Expanding the finite product produces exactly the terms indexed by positive integers whose prime divisors all lie in that finite set, and multiplicativity identifies the coefficient with $f(n)$. We then let the finite set of primes increase to all primes and use absolute convergence of the Dirichlet series to control the omitted tail. The same absolute convergence also proves convergence of the infinite Euler product.
[/proofplan]
[step:Fix the complex parameter and define the absolutely summable coefficients]
Fix $s \in \mathbb{C}$ such that
\begin{align*}
\sum_{n=1}^{\infty} \left|\frac{f(n)}{n^s}\right| < \infty.
\end{align*}
For each $n \in \mathbb{N}$, define the coefficient $a_n \in \mathbb{C}$ by
\begin{align*}
a_n := \frac{f(n)}{n^s}.
\end{align*}
Then
\begin{align*}
\sum_{n=1}^{\infty} |a_n| < \infty.
\end{align*}
Since $f$ is multiplicative and $m^{-s}n^{-s}=(mn)^{-s}$ for $m,n \in \mathbb{N}$, the sequence $(a_n)_{n \in \mathbb{N}}$ is multiplicative:
\begin{align*}
a_{mn}=a_m a_n
\end{align*}
whenever $\gcd(m,n)=1$.
[guided]
We freeze one value of the complex parameter $s$ in the region of absolute convergence. This turns the Dirichlet series into an ordinary absolutely convergent series of complex numbers.
For each $n \in \mathbb{N}$, define
\begin{align*}
a_n := \frac{f(n)}{n^s}.
\end{align*}
The hypothesis on $s$ is precisely
\begin{align*}
\sum_{n=1}^{\infty} |a_n| < \infty.
\end{align*}
This absolute convergence is the analytic input of the proof.
The arithmetic input is multiplicativity. If $m,n \in \mathbb{N}$ and $\gcd(m,n)=1$, then
\begin{align*}
a_{mn}
=
\frac{f(mn)}{(mn)^s}
=
\frac{f(m)f(n)}{m^s n^s}
=
a_m a_n.
\end{align*}
Thus the coefficients of the Dirichlet series inherit the same multiplicativity as $f$. This is the property that will make the expanded Euler product collapse to the correct Dirichlet coefficients.
[/guided]
[/step]
[step:Expand the Euler product over a finite set of primes]
Let $P$ be a finite set of prime numbers. Define $\mathbb{N}_0 := \{0,1,2,\dots\}$ to be the set of non-negative integers. Define the set of $P$-smooth positive integers by
\begin{align*}
\mathbb{N}_P := \{n \in \mathbb{N} : \text{every prime divisor of } n \text{ belongs to } P\}.
\end{align*}
For a finite set $E$, write $\mathbb{N}_0^E$ for the set of functions $E \to \mathbb{N}_0$, whose element indexed by $p \in E$ is denoted by $k_p$. For each $p \in P$, the series
\begin{align*}
\sum_{k=0}^{\infty} a_{p^k}
\end{align*}
converges absolutely because it is a subseries of $\sum_{n=1}^{\infty} |a_n|$. Since $P$ is finite, the finite-product form of the Cauchy product theorem for absolutely convergent series applies: repeated multiplication of absolutely convergent series is justified by absolute convergence of the corresponding multiple series. Hence
\begin{align*}
\prod_{p \in P} \left(\sum_{k=0}^{\infty} a_{p^k}\right)
=
\sum_{(k_p)_{p \in P} \in \mathbb{N}_0^P}
\prod_{p \in P} a_{p^{k_p}}.
\end{align*}
For each multi-index $(k_p)_{p \in P} \in \mathbb{N}_0^P$, define
\begin{align*}
n(k) := \prod_{p \in P} p^{k_p}.
\end{align*}
The factors $p^{k_p}$ are pairwise coprime as $p$ varies over $P$, so repeated use of multiplicativity gives
\begin{align*}
\prod_{p \in P} a_{p^{k_p}} = a_{n(k)}.
\end{align*}
By uniqueness of prime factorisation (citing a result not yet in the wiki: [Fundamental Theorem of Arithmetic](/theorems/730)), the map
\begin{align*}
(k_p)_{p \in P} \mapsto n(k)
\end{align*}
is a bijection from $\mathbb{N}_0^P$ onto $\mathbb{N}_P$. Hence
\begin{align*}
\prod_{p \in P} \left(\sum_{k=0}^{\infty} a_{p^k}\right)
=
\sum_{n \in \mathbb{N}_P} a_n.
\end{align*}
[guided]
The finite product is where the Euler product is algebraic rather than analytic. Fix a finite set $P$ of prime numbers. Define $\mathbb{N}_0 := \{0,1,2,\dots\}$ to be the set of non-negative integers, and for a finite set $E$ write $\mathbb{N}_0^E$ for the set of functions $E \to \mathbb{N}_0$. If $k \in \mathbb{N}_0^E$, its value at $p \in E$ is denoted by $k_p$. Define
\begin{align*}
\mathbb{N}_P := \{n \in \mathbb{N} : \text{every prime divisor of } n \text{ belongs to } P\}.
\end{align*}
These are exactly the positive integers built only from primes in $P$.
For each $p \in P$, the local factor
\begin{align*}
\sum_{k=0}^{\infty} a_{p^k}
\end{align*}
converges absolutely because its absolute-value series is a subseries of the absolutely convergent series $\sum_{n=1}^{\infty}|a_n|$. Since $P$ is finite, we may use the finite-product form of the Cauchy product theorem for absolutely convergent series. The required hypothesis is absolute convergence of each local series, which was just verified. Therefore the product expands as the absolutely convergent multiple series
\begin{align*}
\prod_{p \in P} \left(\sum_{k=0}^{\infty} a_{p^k}\right)
=
\sum_{(k_p)_{p \in P} \in \mathbb{N}_0^P}
\prod_{p \in P} a_{p^{k_p}}.
\end{align*}
Now take one exponent tuple $(k_p)_{p \in P} \in \mathbb{N}_0^P$ and define
\begin{align*}
n(k) := \prod_{p \in P} p^{k_p}.
\end{align*}
The integers $p^{k_p}$ are pairwise coprime for distinct primes $p$. Therefore multiplicativity applies successively and gives
\begin{align*}
\prod_{p \in P} a_{p^{k_p}} = a_{n(k)}.
\end{align*}
The only remaining point is indexing. By uniqueness of prime factorisation (citing a result not yet in the wiki: Fundamental Theorem of Arithmetic), every integer whose prime divisors lie in $P$ has a unique expression
\begin{align*}
n=\prod_{p \in P}p^{k_p}
\end{align*}
with $k_p \in \mathbb{N}_0$. Thus the map
\begin{align*}
(k_p)_{p \in P} \mapsto n(k)
\end{align*}
is a bijection from $\mathbb{N}_0^P$ onto $\mathbb{N}_P$. Reindexing the expanded product through this bijection yields
\begin{align*}
\prod_{p \in P} \left(\sum_{k=0}^{\infty} a_{p^k}\right)
=
\sum_{n \in \mathbb{N}_P} a_n.
\end{align*}
[/guided]
[/step]
[step:Pass from finite prime sets to all primes using absolute convergence]
Let $(p_j)_{j=1}^{\infty}$ denote the increasing enumeration of the prime numbers, and for each $J \in \mathbb{N}$ define
\begin{align*}
P_J := \{p_1,\dots,p_J\}.
\end{align*}
From the finite-product identity,
\begin{align*}
\prod_{p \in P_J} \left(\sum_{k=0}^{\infty} a_{p^k}\right)
=
\sum_{n \in \mathbb{N}_{P_J}} a_n.
\end{align*}
Since $\mathbb{N}_{P_J} \subset \mathbb{N}_{P_{J+1}}$ and
\begin{align*}
\bigcup_{J=1}^{\infty} \mathbb{N}_{P_J}=\mathbb{N},
\end{align*}
the omitted sets $\mathbb{N}\setminus \mathbb{N}_{P_J}$ decrease to the empty set. Absolute convergence of $\sum_{n=1}^{\infty}a_n$ gives the tail estimate
\begin{align*}
\left|\sum_{n=1}^{\infty} a_n - \sum_{n \in \mathbb{N}_{P_J}} a_n\right|
\le
\sum_{n \notin \mathbb{N}_{P_J}} |a_n|
\to 0.
\end{align*}
Hence
\begin{align*}
\lim_{J \to \infty} \sum_{n \in \mathbb{N}_{P_J}} a_n
=
\sum_{n=1}^{\infty} a_n.
\end{align*}
Therefore
\begin{align*}
\lim_{J \to \infty}
\prod_{p \in P_J} \left(\sum_{k=0}^{\infty} a_{p^k}\right)
=
\sum_{n=1}^{\infty} a_n.
\end{align*}
[guided]
The finite identity is already the desired formula except that only finitely many primes are allowed. We now exhaust the primes. Let $(p_j)_{j=1}^{\infty}$ be the increasing enumeration of all prime numbers, and define
\begin{align*}
P_J := \{p_1,\dots,p_J\}
\end{align*}
for each $J \in \mathbb{N}$.
The finite-product computation gives
\begin{align*}
\prod_{p \in P_J} \left(\sum_{k=0}^{\infty} a_{p^k}\right)
=
\sum_{n \in \mathbb{N}_{P_J}} a_n.
\end{align*}
As $J$ increases, the sets $\mathbb{N}_{P_J}$ increase:
\begin{align*}
\mathbb{N}_{P_J} \subset \mathbb{N}_{P_{J+1}}.
\end{align*}
Also, every positive integer has only finitely many prime divisors, so each $n \in \mathbb{N}$ belongs to $\mathbb{N}_{P_J}$ for all sufficiently large $J$. Hence
\begin{align*}
\bigcup_{J=1}^{\infty} \mathbb{N}_{P_J}=\mathbb{N}.
\end{align*}
Absolute convergence now justifies passing to the limit. Indeed, the omitted tail is
\begin{align*}
\sum_{n \notin \mathbb{N}_{P_J}} a_n,
\end{align*}
and its absolute value is bounded by
\begin{align*}
\sum_{n \notin \mathbb{N}_{P_J}} |a_n|.
\end{align*}
Because the sets $\mathbb{N}_{P_J}$ increase to all of $\mathbb{N}$ and $\sum_{n=1}^{\infty}|a_n|<\infty$, this tail tends to $0$. Therefore
\begin{align*}
\lim_{J \to \infty} \sum_{n \in \mathbb{N}_{P_J}} a_n
=
\sum_{n=1}^{\infty} a_n.
\end{align*}
Combining this with the finite-product identity gives
\begin{align*}
\lim_{J \to \infty}
\prod_{p \in P_J} \left(\sum_{k=0}^{\infty} a_{p^k}\right)
=
\sum_{n=1}^{\infty} a_n.
\end{align*}
[/guided]
[/step]
[step:Verify absolute convergence of the infinite Euler product]
For each prime $p$, define the local remainder $b_p \in \mathbb{C}$ by
\begin{align*}
b_p := \sum_{k=1}^{\infty} a_{p^k}.
\end{align*}
This series converges absolutely, and
\begin{align*}
\sum_p |b_p|
\le
\sum_p \sum_{k=1}^{\infty} |a_{p^k}|
\le
\sum_{n=2}^{\infty} |a_n|
<\infty.
\end{align*}
For an absolutely summable family $(b_p)$ indexed by primes, the infinite product $\prod_p(1+b_p)$ converges absolutely: indeed, $\sum_p |b_p|<\infty$ implies convergence of the finite partial products by the standard absolute convergence criterion for infinite products. Thus the product
\begin{align*}
\prod_p (1+b_p)
\end{align*}
converges absolutely as the limit of its finite partial products. Since
\begin{align*}
1+b_p
=
\sum_{k=0}^{\infty} a_{p^k}
=
\sum_{k=0}^{\infty} \frac{f(p^k)}{p^{ks}},
\end{align*}
the previous step gives
\begin{align*}
\prod_p \left(\sum_{k=0}^{\infty} \frac{f(p^k)}{p^{ks}}\right)
=
\sum_{n=1}^{\infty} \frac{f(n)}{n^s}.
\end{align*}
[guided]
We have already shown that the finite partial products converge to the Dirichlet series. It remains to record that this limiting product is an absolutely convergent Euler product in the standard sense.
For each prime $p$, define
\begin{align*}
b_p := \sum_{k=1}^{\infty} a_{p^k}.
\end{align*}
The series defining $b_p$ converges absolutely because
\begin{align*}
\sum_{k=1}^{\infty}|a_{p^k}|
\end{align*}
is a subseries of the absolutely convergent series $\sum_{n=1}^{\infty}|a_n|$. Summing over all primes gives
\begin{align*}
\sum_p |b_p|
\le
\sum_p \sum_{k=1}^{\infty} |a_{p^k}|
\le
\sum_{n=2}^{\infty} |a_n|
<\infty.
\end{align*}
The middle inequality holds because the collection of prime powers $p^k$ with $p$ prime and $k \ge 1$ is a subset of the positive integers greater than $1$.
The convergence of $\sum_p |b_p|$ is exactly the standard absolute-convergence condition for the infinite product
\begin{align*}
\prod_p (1+b_p).
\end{align*}
That criterion says that if the sum of the absolute local remainders is finite, then the finite partial products form a convergent net over finite prime sets, and this limit is called the absolutely convergent infinite product. Here
\begin{align*}
1+b_p
=
\sum_{k=0}^{\infty} a_{p^k}
=
\sum_{k=0}^{\infty} \frac{f(p^k)}{p^{ks}}.
\end{align*}
Therefore the infinite product over primes exists as the limit of its finite partial products, and the limit computed in the previous step gives
\begin{align*}
\prod_p \left(\sum_{k=0}^{\infty} \frac{f(p^k)}{p^{ks}}\right)
=
\sum_{n=1}^{\infty} \frac{f(n)}{n^s}.
\end{align*}
This proves the Euler product formula at the chosen point $s$. Since the choice of $s$ was arbitrary among points where the Dirichlet series converges absolutely, the identity holds throughout every half-plane of absolute convergence.
[/guided]
[/step]