[proofplan]
We differentiate the logarithm of the Euler product, justify the term-by-term differentiation by uniform convergence of $\sum_p |\log(1 - p^{-s})|$ on compact subsets of $\{\operatorname{Re}(s) > 1\}$, expand each factor $-\log(1 - p^{-s})$ as a power series in $p^{-s}$, and reindex the resulting double sum by the von Mangoldt function $\Lambda(n)$. The two key analytic inputs are the [Euler Product and Non-Vanishing](/theorems/1747), which gives the product representation $\zeta(s) = \prod_p (1 - p^{-s})^{-1}$ with all factors nonzero, and the absolute convergence of $\sum_p p^{-s}$ for $\sigma > 1$, which licenses term-by-term differentiation.
[/proofplan]
[step:Take the logarithm of the Euler product on compact subsets of $\{\operatorname{Re}(s) > 1\}$]
Fix $\sigma_0 > 1$ and work on the strip $\{s \in \mathbb{C} : \operatorname{Re}(s) \geq \sigma_0\}$. By the [Euler Product and Non-Vanishing](/theorems/1747),
\begin{align*}
\zeta(s) = \prod_{p \text{ prime}} \left( 1 - \frac{1}{p^s} \right)^{-1}, \qquad \zeta(s) \neq 0,
\end{align*}
on $\{\operatorname{Re}(s) > 1\}$. We now take logarithms termwise. For each prime $p$ and $\sigma := \operatorname{Re}(s) \geq \sigma_0 > 1$, $|p^{-s}| = p^{-\sigma} \leq p^{-\sigma_0} \leq 2^{-\sigma_0} < 1$, so $1 - p^{-s}$ lies in the slit domain where the principal branch of logarithm is holomorphic and satisfies the power-series expansion
\begin{align*}
-\log\!\left( 1 - \frac{1}{p^s} \right) = \sum_{k=1}^{\infty} \frac{1}{k p^{ks}}.
\end{align*}
Define
\begin{align*}
L: \{s \in \mathbb{C} : \operatorname{Re}(s) > 1\} &\to \mathbb{C} \\
s &\mapsto \sum_{p \text{ prime}} \sum_{k=1}^\infty \frac{1}{k p^{ks}}.
\end{align*}
We verify this double series converges absolutely on $\{\operatorname{Re}(s) \geq \sigma_0\}$. For $\sigma \geq \sigma_0$,
\begin{align*}
\sum_{p} \sum_{k \geq 1} \frac{1}{k p^{k\sigma}} \leq \sum_p \sum_{k \geq 1} \frac{1}{p^{k\sigma}} = \sum_p \frac{p^{-\sigma}}{1 - p^{-\sigma}} \leq \sum_p \frac{p^{-\sigma_0}}{1 - 2^{-\sigma_0}} = \frac{1}{1 - 2^{-\sigma_0}} \sum_p p^{-\sigma_0} < \infty,
\end{align*}
where the final sum converges because $\sum_n n^{-\sigma_0} < \infty$ (by the [Convergence of the Zeta Series](/theorems/1746)) and $\sum_p p^{-\sigma_0} \leq \sum_n n^{-\sigma_0}$. Hence $L$ is well-defined and holomorphic on $\{\operatorname{Re}(s) > 1\}$, and for $s$ with $\sigma > 1$,
\begin{align*}
\log \zeta(s) = L(s),
\end{align*}
where $\log$ denotes the branch of logarithm on $\{\operatorname{Re}(s) > 1\}$ with $\log \zeta(\sigma) \in \mathbb{R}$ for real $\sigma > 1$.
[guided]
The starting point is the Euler product: for $s$ with $\sigma = \operatorname{Re}(s) > 1$,
\begin{align*}
\zeta(s) = \prod_p \left(1 - \frac{1}{p^s}\right)^{-1},
\end{align*}
and $\zeta(s) \neq 0$ on this half-plane (both facts are in the [Euler Product and Non-Vanishing](/theorems/1747)).
Since $\zeta(s) \neq 0$, we can take a logarithm. We do so via the product: taking $\log$ of each factor and summing. But this requires convergence. Each factor $(1 - p^{-s})^{-1}$ differs from $1$ by $O(p^{-\sigma})$, so $\log(1 - p^{-s})^{-1} = O(p^{-\sigma})$, and $\sum_p p^{-\sigma}$ converges for $\sigma > 1$ (bounded by $\sum_n n^{-\sigma}$).
To make this precise, fix any $\sigma_0 > 1$ and work on $\{\sigma \geq \sigma_0\}$. For $\sigma \geq \sigma_0 > 1$ and any prime $p \geq 2$, $|p^{-s}| = p^{-\sigma} \leq 2^{-\sigma_0} < 1$, so the principal branch of logarithm satisfies
\begin{align*}
-\log(1 - z) = \sum_{k=1}^\infty \frac{z^k}{k} \quad \text{for } |z| < 1,
\end{align*}
applied with $z = p^{-s}$ gives
\begin{align*}
-\log(1 - p^{-s}) = \sum_{k=1}^\infty \frac{1}{k p^{ks}}.
\end{align*}
Summing over primes,
\begin{align*}
L(s) := \sum_p \sum_{k \geq 1} \frac{1}{k p^{ks}}.
\end{align*}
We verify absolute convergence. Bounding each term in absolute value by $|p^{-ks}|/k = p^{-k\sigma}/k \leq p^{-k\sigma}$,
\begin{align*}
\sum_p \sum_{k \geq 1} \frac{|1|}{k p^{k\sigma}} \leq \sum_p \sum_{k \geq 1} p^{-k\sigma} = \sum_p \frac{p^{-\sigma}}{1 - p^{-\sigma}}.
\end{align*}
Since $\sigma \geq \sigma_0 > 1$, $p^{-\sigma} \leq 1/2$ for all primes $p \geq 2$ (actually we need $p^{-\sigma_0} \leq 1/2$, which holds for $p \geq 2$ and $\sigma_0 > 1$), so $1 - p^{-\sigma} \geq 1/2$, giving
\begin{align*}
\sum_p \frac{p^{-\sigma}}{1 - p^{-\sigma}} \leq 2 \sum_p p^{-\sigma} \leq 2 \sum_{n \geq 2} n^{-\sigma_0} < \infty.
\end{align*}
By the [Convergence of the Zeta Series](/theorems/1746) this last sum is finite. So $L$ is well-defined by an absolutely and uniformly (on $\{\sigma \geq \sigma_0\}$) convergent double series. On compact subsets of $\{\sigma > 1\}$, we can always take $\sigma_0$ just below the minimum of $\sigma$ on the compact, so $L$ is holomorphic on $\{\sigma > 1\}$.
Finally, $L$ equals $\log \zeta$: the partial products $\prod_{p \leq N}(1 - p^{-s})^{-1}$ converge to $\zeta(s)$ by Theorem 1747, and their logarithms are partial sums of $L$. Continuity of log around $\zeta(s) \neq 0$ gives $\lim \sum_{p \leq N} -\log(1 - p^{-s}) = \log \zeta(s)$, using the branch of log that is real on the positive real axis and real-valued at $\log \zeta(\sigma)$ for $\sigma > 1$.
[/guided]
[/step]
[step:Differentiate termwise, justifying the interchange of sum and derivative]
We compute $L'(s) = (\log \zeta)'(s) = \zeta'(s)/\zeta(s)$. Differentiating termwise: for a fixed prime $p$ and $k \geq 1$, the function $s \mapsto \frac{1}{k p^{ks}} = \frac{1}{k} e^{-ks \log p}$ is entire, with derivative
\begin{align*}
\frac{d}{ds} \left[ \frac{1}{k p^{ks}} \right] = \frac{1}{k} \cdot (-k \log p) \cdot e^{-ks \log p} = -\frac{\log p}{p^{ks}}.
\end{align*}
If the termwise differentiation is valid,
\begin{align*}
L'(s) = -\sum_{p \text{ prime}} \sum_{k \geq 1} \frac{\log p}{p^{ks}}.
\end{align*}
To justify the interchange, fix $\sigma_0 > 1$ and work on $\{\sigma \geq \sigma_0\}$. The termwise derivatives satisfy
\begin{align*}
\left| \frac{\log p}{p^{ks}} \right| = \frac{\log p}{p^{k\sigma}} \leq \frac{\log p}{p^{k \sigma_0}}.
\end{align*}
The double sum of the right-hand side converges: using $\log p \leq p^{\varepsilon}$ for any $\varepsilon > 0$ and $p$ large, pick $\varepsilon > 0$ with $\sigma_0 - \varepsilon > 1$ (possible since $\sigma_0 > 1$), so
\begin{align*}
\sum_p \sum_{k \geq 1} \frac{\log p}{p^{k\sigma_0}} \leq \sum_p \frac{\log p}{p^{\sigma_0}} \cdot \frac{1}{1 - p^{-\sigma_0}} \leq 2 \sum_p \frac{\log p}{p^{\sigma_0}} \leq 2 \sum_{n \geq 2} \frac{n^\varepsilon}{n^{\sigma_0}} = 2 \sum_n n^{-(\sigma_0 - \varepsilon)} < \infty.
\end{align*}
By the Weierstrass M-test applied to the double series — equivalently, by the standard theorem on differentiation of uniformly convergent series of holomorphic functions — the termwise differentiation is valid on $\{\sigma \geq \sigma_0\}$, and since $\sigma_0 > 1$ was arbitrary, on all of $\{\sigma > 1\}$. Hence
\begin{align*}
\frac{\zeta'(s)}{\zeta(s)} = L'(s) = -\sum_{p \text{ prime}} \sum_{k \geq 1} \frac{\log p}{p^{ks}}, \qquad \operatorname{Re}(s) > 1.
\end{align*}
[guided]
We have $L(s) = \log \zeta(s) = \sum_p \sum_{k \geq 1} \frac{1}{k p^{ks}}$. Differentiating each term gives
\begin{align*}
\frac{d}{ds}\left[\frac{1}{k p^{ks}}\right] = \frac{d}{ds}\left[\frac{1}{k} e^{-ks \log p}\right] = \frac{-k \log p}{k} e^{-ks \log p} = -\frac{\log p}{p^{ks}}.
\end{align*}
We want to claim
\begin{align*}
L'(s) = -\sum_p \sum_{k \geq 1} \frac{\log p}{p^{ks}}.
\end{align*}
The standard theorem for differentiating an infinite sum of holomorphic functions: if $f_n$ are holomorphic on an open set $U$ and $\sum f_n$ converges locally uniformly on $U$, then $\sum f_n$ is holomorphic and $(\sum f_n)' = \sum f_n'$ (as another locally uniformly convergent series). We must verify local uniform convergence of the differentiated series $\sum_p \sum_{k} \log p \cdot p^{-ks}$.
Fix a compact $K \subset \{\sigma > 1\}$ with $\sigma_0 := \min_{s \in K} \operatorname{Re}(s) > 1$. For each $s \in K$,
\begin{align*}
\left| \frac{\log p}{p^{ks}} \right| = \frac{\log p}{p^{k\sigma}} \leq \frac{\log p}{p^{k\sigma_0}}.
\end{align*}
The dominating double series $\sum_p \sum_k \log p \cdot p^{-k\sigma_0}$ is a convergent Dirichlet-type sum. To verify convergence, use $\log p = o(p^\varepsilon)$ as $p \to \infty$ for any fixed $\varepsilon > 0$. Choose $\varepsilon \in (0, \sigma_0 - 1)$ (possible because $\sigma_0 > 1$); then $\log p \leq C_\varepsilon p^\varepsilon$ for all $p \geq 2$, with $C_\varepsilon$ a finite constant. Summing over $k \geq 1$ gives a geometric factor:
\begin{align*}
\sum_{k \geq 1} \frac{\log p}{p^{k\sigma_0}} = \frac{\log p}{p^{\sigma_0}} \cdot \frac{1}{1 - p^{-\sigma_0}} \leq 2 \cdot \frac{\log p}{p^{\sigma_0}} \leq \frac{2 C_\varepsilon}{p^{\sigma_0 - \varepsilon}}.
\end{align*}
Summing over primes,
\begin{align*}
\sum_p \frac{2 C_\varepsilon}{p^{\sigma_0 - \varepsilon}} \leq 2 C_\varepsilon \sum_{n \geq 2} \frac{1}{n^{\sigma_0 - \varepsilon}} < \infty,
\end{align*}
using $\sigma_0 - \varepsilon > 1$ and the [Convergence of the Zeta Series](/theorems/1746). This is a uniform bound by a summable sequence (Weierstrass M-test), so the differentiated series converges uniformly on $K$. Since $K$ was arbitrary, it converges locally uniformly on $\{\sigma > 1\}$, so termwise differentiation is valid:
\begin{align*}
L'(s) = -\sum_p \sum_{k \geq 1} \frac{\log p}{p^{ks}}.
\end{align*}
By the chain rule, since $\zeta(s) = e^{L(s)}$ (via $L = \log \zeta$),
\begin{align*}
\zeta'(s) = e^{L(s)} L'(s) = \zeta(s) L'(s), \qquad \Longrightarrow \qquad \frac{\zeta'(s)}{\zeta(s)} = L'(s).
\end{align*}
Combining, we have
\begin{align*}
\frac{\zeta'(s)}{\zeta(s)} = -\sum_p \sum_{k \geq 1} \frac{\log p}{p^{ks}}.
\end{align*}
[/guided]
[/step]
[step:Reindex the double sum by $n = p^k$ to recognise the von Mangoldt function]
Recall the von Mangoldt function
\begin{align*}
\Lambda : \mathbb{N} &\to \mathbb{R}_{\geq 0} \\
n &\mapsto \begin{cases} \log p & \text{if } n = p^k \text{ for some prime } p \text{ and integer } k \geq 1, \\ 0 & \text{otherwise}. \end{cases}
\end{align*}
The double sum indexed by $(p, k)$ with $p$ prime and $k \geq 1$ is in bijection with the set of prime powers $\{n = p^k : p \text{ prime}, k \geq 1\}$, via $(p, k) \mapsto n = p^k$, which is a bijection by unique factorisation. Rewriting,
\begin{align*}
\sum_{p \text{ prime}} \sum_{k \geq 1} \frac{\log p}{p^{ks}} = \sum_{\substack{n \geq 2 \\ n = p^k}} \frac{\log p}{n^s} = \sum_{n \geq 1} \frac{\Lambda(n)}{n^s},
\end{align*}
where in the final equality we extend the sum over all $n \geq 1$ using that $\Lambda(n) = 0$ on non-prime-powers and $\Lambda(1) = 0$. The rearrangement is legitimate because the double sum converges absolutely on $\{\operatorname{Re}(s) > 1\}$ (Step 2).
Combining Steps 1 through 3,
\begin{align*}
-\frac{\zeta'(s)}{\zeta(s)} = \sum_p \sum_{k \geq 1} \frac{\log p}{p^{ks}} = \sum_{n=1}^\infty \frac{\Lambda(n)}{n^s}, \qquad \operatorname{Re}(s) > 1,
\end{align*}
which is the desired identity.
[guided]
The formula from Step 2 is
\begin{align*}
-\frac{\zeta'(s)}{\zeta(s)} = \sum_p \sum_{k \geq 1} \frac{\log p}{p^{ks}}.
\end{align*}
We want to rewrite this as a Dirichlet series $\sum_n a_n / n^s$. The natural reindexing is $n = p^k$: for each prime $p$ and $k \geq 1$, the term $\log p \cdot p^{-ks}$ equals $\log p \cdot n^{-s}$ where $n = p^k$.
By unique factorisation, each prime power $n = p^k$ (with $p$ prime, $k \geq 1$) determines $p$ and $k$ uniquely, so the map $(p, k) \mapsto p^k$ is a bijection from $\{\text{primes}\} \times \mathbb{N}_{\geq 1}$ to the set of prime powers. Moreover, the coefficient $\log p$ depends only on $n = p^k$ through the unique prime $p$, and this is the definition of the von Mangoldt function:
\begin{align*}
\Lambda(n) := \begin{cases} \log p & n = p^k \text{ for some prime } p, k \geq 1, \\ 0 & \text{otherwise.} \end{cases}
\end{align*}
Note $\Lambda(1) = 0$ (since $1$ is not a prime power).
Reindexing,
\begin{align*}
\sum_p \sum_{k \geq 1} \frac{\log p}{p^{ks}} = \sum_{n \text{ a prime power}} \frac{\Lambda(n)}{n^s} = \sum_{n \geq 1} \frac{\Lambda(n)}{n^s},
\end{align*}
the final extension to all $n \geq 1$ being harmless because $\Lambda(n) = 0$ outside the prime powers.
Is the rearrangement legitimate? We need absolute convergence, which we verified in Step 2 (the double sum $\sum_p \sum_k \log p \cdot p^{-k\sigma}$ converges for $\sigma > 1$). Absolute convergence of a double sum permits any rearrangement, including the reindexing by prime powers, without changing the value.
Hence
\begin{align*}
-\frac{\zeta'(s)}{\zeta(s)} = \sum_{n=1}^\infty \frac{\Lambda(n)}{n^s}, \qquad \operatorname{Re}(s) > 1,
\end{align*}
which is the identity asserted in the theorem.
[/guided]
[/step]