Skip to content

The Lerch Transcendent ​

One function sits above the whole zeta/polylog family:

Φ(z,s,a)  =  ∑n=0∞zn(n+a)s.\Phi(z, s, a) \;=\; \sum_{n=0}^{\infty} \frac{z^n}{(n+a)^s}.

Set z=1z = 1 and it is the Hurwitz zeta ζ(s,a)\zeta(s, a) (and ζ(s)\zeta(s) at a=1a=1). Walk along a=1a = 1 and it is the polylogarithm, Li⁡s(z)=z Φ(z,s,1)\operatorname{Li}_s(z) = z\,\Phi(z, s, 1). Sit at z=−1z = -1 and it is the Dirichlet eta η(s)=Φ(−1,s,1)\eta(s) = \Phi(-1, s, 1), whose value at s=1s = 1 is ln⁡2\ln 2. @enumeratio/analytic provides LerchPhi; the znz^n factor makes the series converge geometrically inside the unit disk, so it is summed directly there. On the z=−1z = -1 rim the terms alternate and direct summation stalls, so those are summed by an Euler transform instead — enough to pin η(1)=ln⁡2\eta(1) = \ln 2 and Φ(−1,2,12)=4G\Phi(-1, 2, \tfrac12) = 4G to machine precision.

Reductions

InLerchPhi(1,2,1)\mathrm{LerchPhi}(1, 2, 1)Outπ26\frac{π^2}{6}InLerchPhi(1,−1,1)\mathrm{LerchPhi}(1, -1, 1)Out−112-\frac{1}{12}InLerchPhi(z,0,a)\mathrm{LerchPhi}(z, 0, a)Out11−z\frac{1}{1-z}
source · editable

Φ(1,2,1)=ζ(2)=π2/6\Phi(1, 2, 1) = \zeta(2) = \pi^2/6, Φ(1,−1,1)=ζ(−1)=−112\Phi(1, -1, 1) = \zeta(-1) = -\tfrac{1}{12}, and Φ(z,0,a)=1/(1−z)\Phi(z, 0, a) = 1/(1-z) for every aa.

The disk of convergence ​

Fix ss and aa and let zz range over the complex plane. The series only converges for ∣z∣<1|z| < 1 — so the natural portrait is a coloured disk: hue is the phase arg⁡Φ\arg \Phi, brightness rises with ∣Φ∣|\Phi|, and outside the unit circle (where the sum diverges and the true function lives only by analytic continuation) is left dark. The whole thing is the same GPU kernel as the zeta portrait, evaluated per pixel.

What to look for. It opens at s=0.5+8is = 0.5 + 8i, and every argument is an axis — the two parts of ss and aa alike. A small Re⁡(s)\operatorname{Re}(s) keeps the higher terms (n+a)−s(n+a)^{-s} from decaying, and the imaginary part winds each one by e−Im⁡(s)ln⁡(n+a)e^{-\operatorname{Im}(s)\ln(n+a)}, so the disk fills with spirals of colour that tighten toward the pole at z=1z = 1 on the right rim. Raise Re⁡(s)\operatorname{Re}(s) and it calms — the n=0n=0 term a−sa^{-s} takes over and Φ\Phi becomes nearly one hue (no zeros or poles live inside the disk). The aa slider shifts the whole pattern. (f32 on the GPU, 4096 terms per pixel, so the very rim is approximate — the CPU kernel is the source of truth.)

The family, in one function ​

specializationisat
Φ(1,s,a)\Phi(1, s, a)Hurwitz zeta ζ(s,a)\zeta(s, a)z=1z = 1
Φ(1,s,1)\Phi(1, s, 1)Riemann zeta ζ(s)\zeta(s)z=1,a=1z = 1, a = 1
z Φ(z,s,1)z\,\Phi(z, s, 1)polylogarithm Li⁡s(z)\operatorname{Li}_s(z)a=1a = 1
Φ(−1,s,1)\Phi(-1, s, 1)Dirichlet eta η(s)\eta(s)z=−1,a=1z = -1, a = 1
Φ(−1,2,12)\Phi(-1, 2, \tfrac12)4×4\times Catalan's constant GG—
Φ(z,0,a)\Phi(z, 0, a)1/(1−z)1/(1-z)s=0s = 0

That last row is why s=0s = 0 evaluates even outside the disk. The η\eta row sits on the unit circle, where the alternating series converges too slowly for direct summation; an Euler transform handles the real z<0z < 0 rim, so η(s)\eta(s) and Catalan's GG come out to machine precision. One series (with that one acceleration) does the work of the whole family.