# Calculating a Dirichlet Character

How would I calculate a function such as $$\sum_{n \leq x}r(n) = L(1, \chi) \cdot x + O(x^{1-\eta}),$$ where $r(n) = \sum_{d|n} \chi(d)$?

The part I'm having difficulty calculating is the L-function part. This particular L-function is equal to $$\sum_{n = 1}^{\infty} \frac{\chi(n)}{n},$$ where $\chi$ is a Dirichlet character. How would you evaluate this function? I looked on the Wikipedia page for both Dirichlet L-Series and Dirichlet Character, and neither had an explicit way of computing the summation. But the Dirichlet character page said that it could be calculated if one knew the modulus of the Dirichlet character? As far as I know, I don't the the modulus for this Dirichlet character. Is knowing the modulus of the character imperative?

• Hard to answer without knowing what $r(n)$ actually is. The number of ways for writing $n$ as a sum of two squares, I guess, but you should state it. – Jack D'Aurizio Nov 26 '17 at 17:09
• Sorry, I forgot to add that part. I've added it in now. – The Traveling Salesman Nov 26 '17 at 18:41