# Dirichlet characters

## Definitions

Symbol: DirichletCharacter $\chi_{q \, . \, \ell}$ Dirichlet character
Symbol: DirichletGroup $G_{q}$ Dirichlet characters with given modulus
Symbol: PrimitiveDirichletCharacters $G^{\text{Primitive}}_{q}$ Primitive Dirichlet characters with given modulus

## Character evaluation

$\chi(n) = \chi_{q \, . \, \ell}\!\left(n\right)\; \text{ where } \chi = \chi_{q \, . \, \ell}$
$\chi(n) \in \left\{ {e}^{2 \pi i k / r} : k \in \mathbb{Z} \right\} \cup \left\{0\right\}\; \text{ where } r = \varphi(q)$
$\chi\!\left(n + q\right) = \chi(n)$
$\chi\!\left(m n\right) = \chi(m) \chi(n)$
$\left(\chi(n) = 0\right) \iff \left(\gcd\!\left(n, q\right) \ne 1\right)$
$\chi(1) = 1$
$\chi(-1) \in \left\{1, -1\right\}$
$\chi(0) = \begin{cases} 1, & q = 1\\0, & q \ne 1\\ \end{cases}$

## Principal characters

$\chi_{q \, . \, 1}\!\left(n\right) = \begin{cases} 1, & \gcd\!\left(n, q\right) = 1\\0, & \text{otherwise}\\ \end{cases}$

## Character group

$G_{q} = \left\{ \chi_{q \, . \, \ell} : \ell \in \{1, 2, \ldots, \max\!\left(q, 2\right) - 1\} \;\mathbin{\operatorname{and}}\; \gcd\!\left(\ell, q\right) = 1 \right\}$
$G^{\text{Primitive}}_{q} = \left\{ \chi : \chi \in G_{q} \;\mathbin{\operatorname{and}}\; \left[a \equiv 1 \pmod {d} \;\mathbin{\operatorname{and}}\; \gcd\!\left(a, q\right) = 1 \;\mathbin{\operatorname{and}}\; \chi(a) \ne 1 \;\text{ for some } a \in \{0, 1, \ldots, q - 1\} \;\text{ for all } d \in \{1, 2, \ldots, q - 1\} \text{ with } d \mid q\right] \right\}$
$\# G_{q} = \varphi(q)$
$\# G^{\text{Primitive}}_{q} = \sum_{d \mid q} \varphi(d) \mu\!\left(\frac{q}{d}\right)$
$\lim_{N \to \infty} \frac{\sum_{q=1}^{N} \# G_{q}}{\frac{1}{2} {N}^{2}} = \frac{6}{{\pi}^{2}}$
$\lim_{N \to \infty} \frac{\sum_{q=1}^{N} \# G^{\text{Primitive}}_{q}}{\sum_{q=1}^{N} \# G_{q}} = \frac{6}{{\pi}^{2}}$

## Primitive decomposition

$\chi = {\chi}_{0} {\chi}_{1} \;\text{ for some } \left(d, {\chi}_{0}\right) \text{ with } d \in \{1, 2, \ldots, q\} \;\mathbin{\operatorname{and}}\; d \mid q \;\mathbin{\operatorname{and}}\; {\chi}_{0} \in G^{\text{Primitive}}_{d}\; \text{ where } {\chi}_{1} = \chi_{q \, . \, 1}$

## Conrey numbering

### Multiplicativity

$\chi_{{q}_{1} {q}_{2} \, . \, \ell} = \chi_{{q}_{1} \, . \, \ell \bmod {q}_{1}} \chi_{{q}_{2} \, . \, \ell \bmod {q}_{2}}$

### Odd powers

Symbol: ConreyGenerator $g_{p}$ Conrey generator
Symbol: DiscreteLog $\log_{b}\!\left(x\right) \bmod q$ Discrete logarithm
$g_{p} = \min \left\{ a : a \in \mathbb{Z}_{\ge 1} \;\mathbin{\operatorname{and}}\; \# \left\{ {a}^{k} \bmod p : k \in \mathbb{Z}_{\ge 0} \right\} = p - 1 \;\mathbin{\operatorname{and}}\; \# \left\{ {a}^{k} \bmod {p}^{2} : k \in \mathbb{Z}_{\ge 0} \right\} = p \left(p - 1\right) \right\}$
$g_{p} = \begin{cases} 10, & p = 40487\\7, & p = 6692367337\\\min\left(A\right), & \text{otherwise}\\ \end{cases}\; \text{ where } A = \left\{ a : a \in \mathbb{Z}_{\ge 1} \;\mathbin{\operatorname{and}}\; \# \left\{ {a}^{k} \bmod p : k \in \mathbb{Z}_{\ge 0} \right\} = p - 1 \right\}$
$\chi_{q \, . \, \ell}\!\left(n\right) = \exp\!\left(\frac{2 \pi i a b}{\varphi(q)}\right)\; \text{ where } q = {p}^{e},\;g = g_{p},\;a = \log_{g}\!\left(\ell\right) \bmod q,\;b = \log_{g}\!\left(n\right) \bmod q$

### Even powers

$\chi_{4 \, . \, 3}\!\left(n\right) = \begin{cases} 1, & n \equiv 1 \pmod {4}\\-1, & n \equiv 3 \pmod {4}\\0, & \text{otherwise}\\ \end{cases}$
$\chi_{q \, . \, \ell}\!\left(n\right) = \exp\!\left(2 \pi i \left(\frac{\left(1 - x\right) \left(1 - y\right)}{8} + \frac{a b}{{2}^{e - 2}}\right)\right)\; \text{ where } q = {2}^{e},\;L(k) = \begin{cases} \left(1, \log_{5}\!\left(k\right) \bmod q\right), & k \in \left\{ {5}^{i} \bmod q : i \in \mathbb{Z}_{\ge 1} \right\}\\\left(-1, \log_{5}\!\left(-k\right) \bmod q\right), & k \in \left\{ -{5}^{i} \bmod q : i \in \mathbb{Z}_{\ge 1} \right\}\\ \end{cases},\;\left(x, a\right) = L(\ell),\;\left(y, b\right) = L(n)$

## Orthogonality

$\sum_{n=0}^{q - 1} \chi(n) = \begin{cases} \varphi(q), & \chi = \chi_{q \, . \, 1}\\0, & \text{otherwise}\\ \end{cases}$
$\sum_{\chi \in G_{q}} \chi(n) = \begin{cases} \varphi(q), & n \equiv 1 \pmod {q}\\0, & \text{otherwise}\\ \end{cases}$
$\sum_{n=0}^{q - 1} {\chi}_{1}(n) \overline{{\chi}_{2}(n)} = \begin{cases} \varphi(q), & {\chi}_{1} = {\chi}_{2}\\0, & \text{otherwise}\\ \end{cases}$
$\sum_{\chi \in G_{q}} \chi(m) \overline{\chi(n)} = \begin{cases} \varphi(q), & n \equiv m \pmod {q} \;\mathbin{\operatorname{and}}\; \gcd\!\left(m, q\right) = 1\\0, & \text{otherwise}\\ \end{cases}$

## Tables

### Primitive and non-primitive characters

Table of $G^{\text{Primitive}}_{q}$ and $G_{q} \setminus G^{\text{Primitive}}_{q}$ for $1 \le q \le 30$

### Character values

Table of $\chi_{1 \, . \, \ell}$
Table of $\chi_{2 \, . \, \ell}$
Table of $\chi_{3 \, . \, \ell}$
Table of $\chi_{4 \, . \, \ell}$
Table of $\chi_{5 \, . \, \ell}$
Table of $\chi_{6 \, . \, \ell}$
Table of $\chi_{7 \, . \, \ell}$
Table of $\chi_{8 \, . \, \ell}$
Table of $\chi_{9 \, . \, \ell}$
Table of $\chi_{10 \, . \, \ell}$
Table of $\chi_{11 \, . \, \ell}$
Table of $\chi_{12 \, . \, \ell}$

## Bounds and inequalities

$\left|\sum_{n=0}^{N} \chi(n)\right| \le \varphi(q)$
$\left|\sum_{n=M}^{N} \chi(n)\right| \le \frac{\sqrt{q} \log(q)}{2 \log(2)} + 3 \sqrt{q}$

## L-series

Related topics: Dirichlet L-functions

$L\!\left(s, \chi\right) = \sum_{n=1}^{\infty} \frac{\chi(n)}{{n}^{s}}$

Copyright (C) Fredrik Johansson and contributors. Fungrim is provided under the MIT license. The source code is on GitHub.

2021-03-15 19:12:00.328586 UTC