Porter's constant explained

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

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

12ln2
\pi2

lnn+o(lnn).

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:

\begin{align} C&={{6ln2}\over{\pi2}}\left[3ln2+4\gamma-{{24}\over{\pi2}}\zeta'(2)-2\right]-{{1}\over{2}}\\[6pt] &={{{6ln2}((48lnA)-(ln2)-(4ln\pi)-2)}\over{\pi2}}-{{1}\over{2}}\\[6pt] &=1.4670780794\ldots \end{align}

where

\gamma

is the Euler–Mascheroni constant

-\zeta\prime(2)={{\pi2}\over6}\left[12lnA-

infty
\gamma-ln(2\pi)\right]=\sum
k=2

{{lnk}\over{k2}}

See also

Notes and References

  1. .