# How to define a function the Dirichlet L-function $L(s,\overline{\chi(5,2)})$ in Mathematica?

In Mathematica:

The Dirichlet L-function with character $\chi(5,2)$, $L(s,\chi(5,2))$, is expressed as DirichletL[5,2,s]

Let $\overline{\chi(5,2)}$ be the complex conjugate of $\chi(5,2)$. How to define the function $L(s,\overline{\chi(5,2)})$ in Mathematica?

Thanks- mike

Maybe by Conjugate[DirichletL[5, 2, Conjugate[s]]]?

$$L(\overline{\chi(5,2)}, s) = \sum_{n=1}^\infty \overline{\chi(5,2)(n)} \, n^{-s} = \sum_{n=1}^\infty \overline{ \chi(5,2)(n) \, \overline{n^{-s}}}$$

and since $n$ is real, we have $\overline{n^{-s}} = n^{-\overline{s}}$.

• Thanks a lot! It turned out that $\overline{\chi(5,2)(n)}= \chi(5,4)(n)$. So this is workaround. But your answer is definitely much better.
– mike
Commented Apr 29, 2018 at 11:27
• You're welcome! Commented Apr 29, 2018 at 11:28
Clear["Global*"];
k = 5;
j = 2;
s = 1/3;
myDirichletL[k, j, s] :=
Sum[DirichletCharacter[k, j, n]/n^s, {n, 1, Infinity},
Regularization -> "Dirichlet"]
myDirichletL[k, j, s] // N[#, 50] &  (* 0.71731601110102824598178333983627154481266327165006 +
0.21553663997474373554157862752378818741609682472521 I *)
DirichletL[k, j, s] // N[#, 50] & (* 0.71731601110102824598178333983627154481266327165006 +
0.21553663997474373554157862752378818741609682472521 I *)


Clear["Global*"];
k = 5;
j = 2;
Sum[Conjugate[DirichletCharacter[k, j, n]]/n^s, {n, 1, Infinity},
Regularization -> "Dirichlet"]


$$5^{-s} \left(\zeta \left(s,\frac{1}{5}\right)-i \zeta \left(s,\frac{2}{5}\right)+i \zeta \left(s,\frac{3}{5}\right)-\zeta \left(s,\frac{4}{5}\right)\right)$$

Where $$\zeta(\cdot, \cdot)$$ is HurwitzZeta

### Reference

https://mathematica.stackexchange.com/a/287529/79318