Skip to content

DirichletL ​

The Dirichlet L-function L(s,χ)=∑n≥1χ(n) n−sL(s, \chi) = \sum_{n\ge1} \chi(n)\,n^{-s} of the jj-th character mod kk — the family that contains ζ\zeta, η\eta and β\beta, and the setting of Dirichlet's theorem on primes in arithmetic progressions.

✓ checked against that system · ! checked, with disagreements (hover a chip)WikipediaDirichlet L-functionMathWorldDirichletL-SeriesWikidataQ2264419nLabDirichlet L-functionDLMF25.15.E1FungrimDirichletLWolfram LanguageDirichletL!
DirichletL(k, j, s)the L-function of DirichletCharacter χj mod k\chi_j \bmod k.
Typed signatures
TypePackageApplies
(integer, integer, number) -> numberanalyticreplaces compute-enginealways
(integer, integer, number) -> numbercompute-enginealways

Domain: Special functions

Details
  • L(s,χ1 mod 1)=ζ(s)L(s, \chi_1 \bmod 1) = \zeta(s), and for the principal character mod kk the Euler factors at the primes dividing kk drop out: L(s,χ1)=ζ(s)∏p∣k(1−p−s)L(s, \chi_1) = \zeta(s)\prod_{p \mid k}(1 - p^{-s}) — so it inherits ζ\zeta's pole at s=1s = 1. Every non-principal LL is entire.
  • L(s,χ2 mod 4)=β(s)L(s, \chi_2 \bmod 4) = \beta(s), the DirichletBeta function; η(s)\eta(s) is not an L-function of this family (the alternating sign is not a character mod 2) but is (1−21−s)ζ(s)(1 - 2^{1-s})\zeta(s). See DirichletEta.
  • L(1,χ)≠0L(1, \chi) \neq 0 for every non-principal χ\chi is the analytic heart of Dirichlet's theorem: each residue class coprime to kk contains infinitely many primes.
  • Values at nonpositive integers are exact: L(−n,χ)=−kn∑r=1kχ(r) Bn+1(r/k)/(n+1)L(-n, \chi) = -k^n \sum_{r=1}^{k} \chi(r)\,B_{n+1}(r/k)/(n+1), an algebraic number in the character's roots of unity (generalized Bernoulli numbers). See BernoulliB.
  • Numerically, L(s,χ)=k−s∑r=1kχ(r) ζ(s,r/k)L(s, \chi) = k^{-s}\sum_{r=1}^{k}\chi(r)\,\zeta(s, r/k) on the HurwitzZeta kernel, for complex ss; near s=1s = 1 the Hurwitz poles cancel against each other, so there the Laurent expansion in the generalized StieltjesGamma constants is summed instead.

Plot

Examples

7 more kept as data, checked against the oracles
Basic #

Modulus 1: the Riemann zeta function itself

live ↗
InDirichletL(1,1,s)\mathrm{DirichletL}(1, 1, s)Outζ(s)ζ(s)

L(1,χ2 mod 4)=β(1)=π/4L(1, \chi_2 \bmod 4) = \beta(1) = \pi/4 — Leibniz's series

live ↗
InDirichletL(4,2,1)\mathrm{DirichletL}(4, 2, 1)Outπ4\frac{π}{4}

L(2,χ1 mod 1)=ζ(2)=π2/6L(2, \chi_1 \bmod 1) = \zeta(2) = \pi^2/6

live ↗
InDirichletL(1,1,2)\mathrm{DirichletL}(1, 1, 2)Outπ26\frac{π^2}{6}

Numeric for a floating-point argument

live ↗
InDirichletL(3,2,1.5)\mathrm{DirichletL}(3, 2, 1.5)Out0.703 968 244 868 732 90.703\,968\,244\,868\,732\,9
Scope #

Complex ss: L(s,χ1 mod 2)=(1−2−s)ζ(s)L(s, \chi_1 \bmod 2) = (1 - 2^{-s})\zeta(s) at s=1+is = 1 + i

live ↗
InN(DirichletL(2,1,1+i))N(\mathrm{DirichletL}(2, 1, 1+i))Out0.654 358 917 407 233 1−0.384 376 350 214 799 6i0.654\,358\,917\,407\,233\,1-0.384\,376\,350\,214\,799\,6i

Listable in ss: threads over a list

live ↗
InDirichletL(1,1,[1,2,3,4])\mathrm{DirichletL}(1, 1, \bigl\lbrack1, 2, 3, 4\bigr\rbrack)Out[∞~,π26,ζ(3),π490]\bigl\lbrack\tilde∞, \frac{π^2}{6}, ζ(3), \frac{π^4}{90}\bigr\rbrack

Interval arithmetic in ss (decreasing here)

live ↗
InDirichletL(5,1,Interval(1.23,1.24))\mathrm{DirichletL}(5, 1, \mathrm{Interval}(1.23, 1.24))OutInterval(4.113 958 567 039 058,4.258 988 950 108 49)\mathrm{Interval}(4.113\,958\,567\,039\,058, 4.258\,988\,950\,108\,49)
live ↗
InN(DirichletL(3,2,12),50)N(\mathrm{DirichletL}(3, 2, \frac{1}{2}), 50)Out0.480 867 557 696 828 626 181 220 063 235 589 877 776 829 730 832 370.480\,867\,557\,696\,828\,626\,181\,220\,063\,235\,589\,877\,776\,829\,730\,832\,37
Properties #

A principal character drops the Euler factors at 22 and 33

live ↗
InDirichletL(12,1,s)\mathrm{DirichletL}(12, 1, s)Out(1−2−s)(1−3−s)ζ(s)(1-2^{-s})(1-3^{-s})ζ(s)

…and keeps ζ\zeta's pole; a non-principal LL is entire

live ↗
InDirichletL(12,1,1)\mathrm{DirichletL}(12, 1, 1)Out∞~\tilde∞

L(0,χ)=35+15iL(0, \chi) = \tfrac35 + \tfrac15 i — exact, from the generalized Bernoulli numbers

live ↗
InDirichletL(5,2,0)\mathrm{DirichletL}(5, 2, 0)Out35+15i\frac{3}{5}+\frac{1}{5}i

L(−3,χ2 mod 8)=11L(-3, \chi_2 \bmod 8) = 11

live ↗
InDirichletL(8,2,−3)\mathrm{DirichletL}(8, 2, -3)Out1111

The principal character mod 2 removes the Euler factor at 2

live ↗
InDirichletL(2,1,s)\mathrm{DirichletL}(2, 1, s)Out(1−2−s)ζ(s)(1-2^{-s})ζ(s)

L(2,χ2 mod 4)=β(2)=GL(2, \chi_2 \bmod 4) = \beta(2) = G

live ↗
InDirichletL(4,2,2)\mathrm{DirichletL}(4, 2, 2)OutG⁡\operatorname{G}

L(0,χ−3)=13L(0, \chi_{-3}) = \tfrac13 — the class number formula's 2h/w2h/w for Q(−3)\mathbb{Q}(\sqrt{-3})

live ↗
InDirichletL(3,2,0)\mathrm{DirichletL}(3, 2, 0)Out13\frac{1}{3}

L(1,χ−3)=π/(33)L(1, \chi_{-3}) = \pi/(3\sqrt3): s=1s = 1 for a real (quadratic) odd character has a closed form, from the Fourier expansion of ∑χ(n)/n\sum \chi(n)/n

live ↗
InDirichletL(3,2,1)\mathrm{DirichletL}(3, 2, 1)Out3π9\frac{\sqrt{3}π}{9}

The principal character mod 2 gives π28\frac{\pi^2}{8} at s=2s=2

live ↗
InDirichletL(2,1,2)\mathrm{DirichletL}(2, 1, 2)Outπ28\frac{π^2}{8}

Known value · Wolfram MathematicalFunctionData, DirichletL

Odd argument gives a multiple of ζ(3)\zeta(3): (1−2−3)ζ(3)(1-2^{-3})\zeta(3)

live ↗
InDirichletL(2,1,3)\mathrm{DirichletL}(2, 1, 3)Out7ζ(3)8\frac{7ζ(3)}{8}

Known value · Wolfram MathematicalFunctionData, DirichletL

Even argument gives a rational multiple of π4\pi^4

live ↗
InDirichletL(2,1,4)\mathrm{DirichletL}(2, 1, 4)Outπ496\frac{π^4}{96}

Known value · Wolfram MathematicalFunctionData, DirichletL

For modulus 3, s=2s=2 gives a multiple of π2\pi^2

live ↗
InDirichletL(3,1,2)\mathrm{DirichletL}(3, 1, 2)Out4π227\frac{4π^2}{27}

Known value · Wolfram MathematicalFunctionData, DirichletL

Odd argument gives 2627ζ(3)\frac{26}{27}\zeta(3)

live ↗
InDirichletL(3,1,3)\mathrm{DirichletL}(3, 1, 3)Out26ζ(3)27\frac{26ζ(3)}{27}

Known value · Wolfram MathematicalFunctionData, DirichletL

Modulus 3 at s=4s=4 is rational times π4\pi^4

live ↗
InDirichletL(3,1,4)\mathrm{DirichletL}(3, 1, 4)Out8π4729\frac{8π^4}{729}

Known value · Wolfram MathematicalFunctionData, DirichletL

Modulus 3 at s=5s=5 is 242243ζ(5)\frac{242}{243}\zeta(5)

live ↗
InDirichletL(3,1,5)\mathrm{DirichletL}(3, 1, 5)Out242ζ(5)243\frac{242ζ(5)}{243}

Known value · Wolfram MathematicalFunctionData, DirichletL

For modulus 5, s=2s=2 gives 4π225\frac{4\pi^2}{25}

live ↗
InDirichletL(5,1,2)\mathrm{DirichletL}(5, 1, 2)Out4π225\frac{4π^2}{25}

Known value · Wolfram MathematicalFunctionData, DirichletL

Modulus 5 at s=3s=3 is 124125ζ(3)\frac{124}{125}\zeta(3)

live ↗
InDirichletL(5,1,3)\mathrm{DirichletL}(5, 1, 3)Out124ζ(3)125\frac{124ζ(3)}{125}

Known value · Wolfram MathematicalFunctionData, DirichletL

Modulus 6 removes both Euler factors for 2 and 3

live ↗
InDirichletL(6,1,2)\mathrm{DirichletL}(6, 1, 2)Outπ29\frac{π^2}{9}

Known value · Wolfram MathematicalFunctionData, DirichletL

Possible issues #

No closed form at positive integer ss in general, so this stays symbolic; N() gives 0.95872+0.14557i0.95872 + 0.14557i

live ↗
InDirichletL(5,2,2)\mathrm{DirichletL}(5, 2, 2)OutDirichletL(5,2,2)\mathrm{DirichletL}(5, 2, 2)
About
Examples34
Checked againstWolfram Language 32 agree2 differ
CrosswalkWikipediaMathWorldWikidatanLabDLMFFungrimWolfram Language

Implementation

referenceenginenotatio

The Hurwitz decomposition — the definition the kernel evaluates, away from s = 1.

nativeenginetypescriptpackages/ce-patches/src/compute-engine/numerics/dirichlet-l.ts
mappedexternalwolfram / mpmathpackages/oracle/src/mappings.ts

DirichletL[k, j, s]; mpmath has dirichlet(s, chi) but takes the character as a period, with no indexing of its own.

See also: DirichletCharacter, DirichletBeta, DirichletEta, HurwitzZeta, Zeta