dirichlet_char – Dirichlet characters

class flint.dirichlet_group(ulong q)

Represents the group of Dirichlet characters modulo a given q.

>>> G = dirichlet_group(5)
>>> G
Dirichlet group mod q = 5
exponent(self)
q
size(self) long
class flint.dirichlet_char(ulong q, ulong l=1)

Represents a Dirichlet character.

Calling the character evaluates the character at the given integer, returning an acb.

>>> from flint import dirichlet_char, ctx
>>> ctx.prec = 53
>>> chi = dirichlet_char(7, 1)
>>> for n in range(7):
...     print(chi(n))
...
0
1.00000000000000
1.00000000000000
1.00000000000000
1.00000000000000
1.00000000000000
1.00000000000000
>>> chi = dirichlet_char(7, 3)
>>> for n in range(7):
...     print(chi(n))
...
0
1.00000000000000
-0.500000000000000 + [0.866025403784439 +/- 5.15e-16]j
0.500000000000000 + [0.866025403784439 +/- 5.15e-16]j
-0.500000000000000 + [-0.866025403784439 +/- 5.15e-16]j
0.500000000000000 + [-0.866025403784439 +/- 5.15e-16]j
-1.00000000000000
chi_exponent(self, n)
conductor(self)
group(self)
hardy_z(self, s)

Evaluates the Hardy Z-function of this character at the given complex number s.

>>> chi = dirichlet_char(1, 1)
>>> from flint import showgood
>>> showgood(lambda: chi.hardy_z(1), dps=25)
-0.7363054628673177346778998
index(self)
is_primitive(self)
is_principal(self)
is_real(self)
l(self, s)

Alias for l_function()

l_function(self, s)

Evaluates the Dirichlet L-function of this character at the given complex number s.

>>> from flint import showgood
>>> chi = dirichlet_char(1, 1)
>>> showgood(lambda: chi.l_function(2), dps=25)
1.644934066848226436472415
>>> chi = dirichlet_char(7, 3)
>>> showgood(lambda: chi.l_function(2+3j), dps=25)
1.273313649440490751755284 - 0.07432329442559421607102118j
modulus(self)
number(self)
order(self)
parity(self)