How to solve $1+\frac12-\frac13+\frac14-\frac15-\frac16+\frac18+\ldots+\left(\frac n7\right)\frac1n+\ldots$? $$1+\frac12-\frac13+\frac14-\frac15-\frac16+\frac18+\ldots+\left(\frac n7\right)\frac1n+\ldots$$
where $\left(\frac n7\right)$ is Legendre symbol.
I think its about algebraic number theory, but I can't find relative problem on book.
If the signs were all +, the series would diverge as a harmonic sum. If the signs would alternate, it is well known that the sum of the series would be $\ln 2$. Here the signs follow a periodically repeating pattern of length seven:
$$++-+--0,$$
where the $0$ at end indicates that terms $1/n$ with $n$ divisible by seven are missing altogether.
 A: Let $\zeta$ be some complex seventh root of unity, i.e. $\zeta=\zeta_\ell:=e^{2\pi \ell i/7}$, $\ell=0,1,2,\ldots,6$. The series
$$
S(\zeta)=\sum_{n=1}^\infty \frac{\zeta^n}n
$$
converges to $-\log(1-\zeta)$ unless $\zeta=1$ when it diverges.
The way to use this is to write the Legendre symbol $\eta:n\mapsto\left(\frac n7\right)$ as a linear combination of the characters $\chi_\ell: n\mapsto\zeta_\ell^n$ with $\ell$ varying. The reason why this works is that $\eta$ as well as all the characters $\chi_\ell$ are actually well-defined functions from $G=\Bbb{Z}/7\Bbb{Z}$ to the complex numbers. Furthermore, the characters $\chi_\ell$, are linearly independent, and thus form a basis of the space of functions $G\to\Bbb{C}$. Therefore we can always find coefficients $c_\ell\in\Bbb{C}, \ell=0,1,2,\ldots,6,$ such that
$$
\eta(n)=\sum_{\ell=0}^6c_\ell\chi_\ell(n)
$$
for all $n\in\Bbb{Z}_{>0}$.  The tool for finding the coefficients $c_\ell$ is the Discrete Fourier Transform of $G$. Thankfully the coefficient $c_0$ corresponding to $S(1)$ vanishes. Otherwise the coefficients seem to be closely related to Gauss' sums, but those can easily be calculated explicitly in such a small case. Leaving that to you (do ask for hints, if you cannot figure it out).
Your sum is then the corresponding linear combination of the $S(\zeta)$s:
$$
\sum_{n=1}^\infty\frac{\eta(n)}n=\sum_{\ell=1}^6c_\ell S(\zeta_\ell).
$$
