Riemann zeta, and related functions#
Riemann \(\zeta(n)\) for integer arguments#
- math53.zeta_i(n)#
Returns the Riemann zeta function \(\zeta(n)\) for integer arguments \(n \ne 1\). For \(n > 63\) the result is \(1\), for \(0 \le n \le 63\) the value is taken from a table, otherwise the Bernoulli numbers are used: \(\zeta(n) = B_{1-n}/(n - 1)\) for \(n < 0\).
See also Wikipedia [1335], MathWorld [971], NIST [19], BoostMath [158], Ehrhardt [297] (3.6.1.2).
An example in Python
>>> from xlcalcnet import ereal >>> ereal.ZetaInt(5) ereal('5.2359877559829887307E-1') >>> ereal.ZetaInt('51') ereal('5.3518479027559984754E-1')
Riemann \(\zeta(1+x)\)#
- math53.zeta1p(x)#
Returns the Riemann zeta function \(\zeta(1+x)\) for \(x \ne 0\). Normally used with \(|x| \ll 1\) for increased accuracy near the pole of \(\zeta(s)\) at \(s = 1\).
See also Wikipedia [1335], MathWorld [971], NIST [19], BoostMath [158], Ehrhardt [297] (3.6.1.3).
An example in Python
>>> from xlcalcnet import ereal >>> ereal.Zeta1p(0.004) ereal('5.2359877559829887307E-1') >>> ereal.Zeta1p('0.0001') ereal('5.3518479027559984754E-1')
Dirichlet eta function for integer argument, \(\eta(n)\)#
- math53.dirichlet_eta_i(n)#
Returns the Dirichlet eta function \(\eta(n)\) for integer arguments. For \(n > 64\) the result is \(1\), for \(0 \le n \le 64\) the value is taken from a table, otherwise for \(n<0\) the Bernoulli numbers are used: \(\eta(n) = (2^{1-n}-1) B_{1-n}/(1-n)\).
See also: MathWorld [998], Ehrhardt [297] (3.6.3.2).
An example in Python
>>> from xlcalcnet import ereal >>> ereal.DirichletEtaInt(5) ereal('5.2359877559829887307E-1') >>> ereal.DirichletEtaInt('51') ereal('5.3518479027559984754E-1')
Prime zeta function#
- math53.prime_zeta(s)#
Returns for \(x > 0.2\) the prime zeta function \(\displaystyle P(x) = \sum_{p \text{ prime}} p^{-x}\), or its real part for \(x<1\).
See also Ehrhardt [297] (3.6.2).
An example in Python
>>> from mpfebnet import XReal >>> XReal.PrimeZeta(12) XReal('5.2359877559829887307E-1') >>> XReal.PrimeZeta('10.0001') XReal('5.3518479027559984754E-1')
An example in Visual Basic
>>> from mpfebnet import Gpr >>> Gpr.PrimeZeta(12) Gpr('5.2359877559829887307E-1') >>> Gpr.PrimeZeta('10.0001') Gpr('5.3518479027559984754E-1')
Riemann prime counting function, \(R(x)\)#
- math53.riemann_r(x)#
Returns \(\displaystyle R(x) = \sum_{n=1}^{\infty} \frac{\mu(n)}{n} \text{li}(x^{1/n}) 1 + \sum_{k=1}^{\infty} \frac{\log^k x}{k k! \zeta(k+1)}, \,\) the Riemann prime counting function, for \(x>0\).
See also Wikipedia [1290], Wikipedia [1291], MathWorld [932], Wikipedia [1289], MathWorld [933], Ehrhardt [297] (3.10.20).
An example in Python
>>> from mpfebnet import XReal >>> XReal.RiemannR(44) XReal('5.2359877559829887307E-1') >>> XReal.RiemannR(4440.4) XReal('5.3518479027559984754E-1')
An example in Visual Basic
>>> from mpfebnet import Gpr >>> Gpr.RiemannR(44) Gpr('5.2359877559829887307E-1') >>> Gpr.RiemannR(4440.4) Gpr('5.3518479027559984754E-1')
Inverse of the Riemann prime counting function, \(R^{-1}(x)\)#
- math53.riemann_r_inv(x)#
Returns the functional inverse of the Riemann prime counting function, i.e. \(R(R^{-1}(x))= x\), for \(x \ge 1.125\).
See also Ehrhardt [297] (3.10.21).
An example in Python
>>> from xlcalcnet import ereal >>> ereal.RiemannRInv(44) ereal('5.2359877559829887307E-1') >>> ereal.RiemannRInv(4440.4) ereal('5.3518479027559984754E-1')
Rogers-Ramanujan continued fraction#
- math53.rogers_ramanujan_cf(q)#
Returns \(\displaystyle R(q) = \frac{q^{1/5}}{1+} \frac{q}{1+} \frac{q^2}{1+} \frac{q^3}{1+} \frac{q^5}{1+}\), the Rogers-Ramanujan continued fraction, for \(|q| < 1\).
See also Ehrhardt [297] (3.10.22).
An example in Python
>>> from xlcalcnet import ereal >>> ereal.RogersRamanujanCF(0.44) ereal('5.2359877559829887307E-1') >>> ereal.RogersRamanujanCF(0.14404) ereal('5.3518479027559984754E-1')
Moebius function, \(\mu(n)\)#
- math53.moebius(n)#
Returns \(\mu(n)\), the Möbius function.
For integer \(n\), the Moebius \(\mu\) function \(\mu(n)\) equals 0 if \(n\) has repeated integer factors. Otherwise, if \(n\) is the product of \(k\) distinct primes, the Moebius \(\mu\) function \(\mu(n)\) equals \((-1)^k\).
https://en.wikipedia.org/wiki/M%C3%B6bius_function
An example in Python
>>> from mpfebnet import XReal >>> XReal.Moebius(3) XReal('5.2359877559829887307E-1') >>> XReal.Moebius) XReal('5.3518479027559984754E-1')
An example in Visual Basic
>>> from mpfebnet import Gpr >>> Gpr.Moebius(3) Gpr('5.2359877559829887307E-1') >>> Gpr.Moebius) Gpr('5.3518479027559984754E-1')
q-Pochhammer Euler function, \((q)_{\infty}\)#
- math53.euler_q(n, x)#
Returns \(\displaystyle \phi(q) = (q)_{\infty} = \prod_{k=1}^{\infty} \left(1-q^k\right)\), the q-Pochhammer Euler function, for \(-1 \le q \le 1\).
See also: MathWorld [1029], Wikipedia [1397], Ehrhardt [297] (3.10.19).
An example in Python
>>> from xlcalcnet import ereal >>> ereal.EulerQ(-0.4) ereal('5.2359877559829887307E-1') >>> ereal.EulerQ(0.4) ereal('5.3518479027559984754E-1')