GCD function and relation between Hurwitz and Riemann zeta function Does anyone know how to show the following:
$\sum_{k=1}^n\gcd(n,k)\zeta(s,\frac{k}{n})=\left(\sum_{k=1}^n\gcd(n,k)\right)\zeta(s)$
 A: Start by re-writing your LHS sum as follows:
$$\sum_{k=1}^n \gcd(n,k) \sum_{d\ge 0} \frac{1}{(d + k/n)^s}
= n^s \sum_{k=1}^n \gcd(n,k) \sum_{d\ge 0} \frac{1}{(nd + k)^s}.$$
Now by inspection the sum part is clearly seen to be
$$L(s) = \sum_{m\ge 1} \frac{\gcd(n,m)}{m^s}.$$
Let $p$ be the primes that divide $n$ and $q$ those that do not.
Let $v$ be the exponent of $p$ in the factorization of $n.$
Then $L(s)$ has the following Euler product:
$$\prod_q \frac{1}{1-1/q^s}
\prod_p \left(1 + \frac{p}{p^s} + \frac{p^2}{p^{2s}}
+\cdots+
\frac{p^v}{p^{vs}}
\left(1+\frac{1}{p^s}+\frac{1}{p^{2s}}+\cdots\right)\right).$$
This is
$$\prod_q \frac{1}{1-1/q^s}
\prod_p \left(\frac{1-1/p^{(s-1)v}}{1-1/p^{s-1}}
+\frac{p^v}{p^{vs}}
\frac{1}{1-1/p^s}\right).$$
which is in turn
$$\zeta(s)
\prod_p \left(\frac{1-1/p^{(s-1)v}}{1-1/p^{s-1}} (1-1/p^s)
+\frac{1}{p^{v(s-1)}}\right).$$
It turns out that re-expansion is the right thing to do at this step.
We get
$$\zeta(s)
\prod_p \left(1-\frac{1}{p^s}+\frac{p}{p^s}-\frac{p}{p^{2s}}
+\frac{p^2}{p^{2s}}-\frac{p^2}{p^{3s}}
+ \cdots +
\frac{p^{v-1}}{p^{s(v-1)}}
-\frac{p^{v-1}}{p^{sv}}
+\frac{p^v}{p^{sv}}\right).$$
This yields
$$\zeta(s)
\prod_p \left(1+\frac{p-1}{p^s}+\frac{p^2-p}{p^{2s}}
+\frac{p^3-p^2}{p^{3s}}+\cdots
+\frac{p^v-p^{v-1}}{p^{vs}}\right).$$
We recognize a truncated Euler  product for the Euler totient function
which is $$\zeta(s)\sum_{d|n} \frac{\varphi(d)}{d^s}.$$
Now recall that we actually need $n^s L(s)$ which is
$$\zeta(s)\sum_{d|n} \varphi(d)\left(\frac{n}{d}\right)^s.$$
To conclude observe that
$$\sum_{k=1}^n \gcd(n,k)^s
= \sum_{d|n} d^s \varphi\left(\frac{n}{d}\right)$$
because $\gcd(n,k)=d$ implies $\gcd(n/d,k/d)=1$ and there are $\varphi
\left(\frac{n}{d}\right)$ such values.
Nice identity I have to say.
Addendum as per the comment.
Replacing Euler's totient $\varphi(d)$ with Jordan's totient $J_l(d)$ we obtain the generalisation (with $l$ being a positive integer)
$$\sum_{k=1}^n \gcd(n,k)^l \zeta\left(s,\frac{k}{n}\right)
= \zeta(s) \times 
\sum_{\mathbb{q}\in \{1,\ldots,n\}^l} \gcd(n,\mathbb{q})^s$$
where $\{1,\ldots,n\}^l$ denotes the set of $l$-tuples with constituents between $1$ and $n.$
