Sum of the divisors of $n$, related to the Hardy-Littlewood circle method 
Prove that $$\sigma(n) = \frac{\pi^2}{6}\,n\sum_{q = 1}^\infty q^{-2}c_q(n)$$
  where $$ c_q(n) = \sum_{a = 1, (a, q) = 1}^q \exp(2\pi i an/q)$$ and $\sigma(n)$ is the sum of the divisors of $n$.

Also, how does this relate to the Hardy-Littlewood Circle Method?
Note: This problem came from a book on the Hardy-Littlewood Circle Method.
 A: This is a short proof for the general case that

$$\sum_{q=1}^{\infty}\frac{c_q(n)}{q^s}=\frac{n^{1-s}\sigma_{s-1}(n)}{\zeta(s)} $$

The result in the OP follows by taking $s=2.$
Using $c_q(n) = \sum_{dr=q,d|n}\mu(r)d\hspace{3mm}(*)$ we get 
$$\frac{c_q(n)}{q^s}=\sum_{dr|q,d|n}\frac{\mu(r)}{r^s}d^{1-s} $$ 
and so
$$ \sum_{q=1}^{\infty}\frac{c_q(n)}{q^s}=\sum_{q=1}^{\infty}\sum_{dr|q,d|n}\frac{\mu(r)}{r^s}=   \sum_{d|n}d^{1-s}\sum_{r=1}^{\infty}\frac{\mu(r)}{r^s}= \frac{\sigma_{1-s}(n)}{\zeta(s)} = \frac{n^{1-s}\sigma_{s-1}(n)}{\zeta(s)}.$$
(*) This follows from $c_q(n) = \sum_{d|q,n}d\mu(\frac{q}{d})$
This proof appears in Moree and Hommerson's paper, Value Distribution of Ramanujan Sums and of Cyclotomic Polynomial Coefficients. They credit Esterman with this short proof and note a longer proof of Ramanujan. A longer version of the proof above appears in this paper. A proper cite for Esterman: T. Esterman, Vereinfachter Beweis eines Satzes von Kloosterman, Abh. Math. Seminar Hamburg Univ. 7 (1929), 82-98.
