Porter's constant

In mathematics, Porter's constant C arises in the study of the efficiency of the Euclidean algorithm. It is named after J. W. Porter of University College, Cardiff.

Euclid's algorithm finds the greatest common divisor of two positive integers m and n. Hans Heilbronn proved that the average number of iterations of Euclid's algorithm, for fixed n and averaged over all choices of relatively prime integers m < n, is

12ln⁡2π2ln⁡n+o(ln⁡n).

Porter showed that the error term in this estimate is a constant, plus a polynomially-small correction, and Donald Knuth evaluated this constant to high accuracy. It is:

C=6ln⁡2π2[3ln⁡2+4γ−24π2ζ′(2)−2]−12=6ln⁡2((48ln⁡A)−(ln⁡2)−(4ln⁡π)−2)π2−12=1.4670780794…

where

γ is the Euler–Mascheroni constant
ζ is the Riemann zeta function
A is the Glaisher–Kinkelin constant

(sequence A086237 in the OEIS)

−ζ′(2)=π26[12ln⁡A−γ−ln⁡(2π)]=∑k=2∞ln⁡kk2

Approximations

The simple approximations of the Porter's constant accurate up to 3 digits can be found as

C=221/38=1.466758730139474...,

accurate up to 4 digits as

C=226/47=1.467328090156686...,

and up to 6 digits as

C=247/85=1.467073525425601....


See also