In mathematics, Landau's function g(n), named after Edmund Landau, is defined for every natural number n to be the largest order of an element of the symmetric group S<sub>n</sub>. Equivalently, g(n) is the largest least common multiple (lcm) of any partition of n, or the maximum number of times a permutation of n elements can be recursively applied to itself before it returns to its starting sequence.
For instance, 5 = 2 + 3 and lcm(2,3) = 6. No other partition of 5 yields a bigger lcm, so g(5) = 6. An element of order 6 in the group S<sub>5</sub> can be written in cycle notation as (1 2) (3 4 5). Note that the same argument applies to the number 6, that is, g(6) = 6. There are arbitrarily long sequences of consecutive numbers n, n + 1, ..., n + m on which the function g is constant.
The integer sequence g(0) = 1, g(1) = 1, g(2) = 2, g(3) = 3, g(4) = 4, g(5) = 6, g(6) = 6, g(7) = 12, g(8) = 15, ... is named after Edmund Landau, who proved in 1902 that
:<math>\lim_{n\to\infty}\frac{\ln(g(n))}{\sqrt{n \ln(n) = 1</math>
(where ln denotes the natural logarithm). Equivalently (using little-o notation), <math>g(n) = e^{(1+o(1))\sqrt{n\ln n</math>.
More precisely,
:<math>\ln g(n)=\sqrt{n\ln n}\left(1+\frac{\ln\ln n-1}{2\ln n}-\frac{(\ln\ln n)^2-6\ln\ln n+9}{8(\ln n)^2}+O\left(\left(\frac{\ln\ln n}{\ln n}\right)^3\right)\right).</math>
If <math>\pi(x)-\operatorname{Li}(x)=O(R(x))</math>, where <math>\pi</math> denotes the prime counting function, <math>\operatorname{Li}</math> the logarithmic integral function with inverse <math>\operatorname{Li}^{-1}</math>, and we may take <math>R(x)=x\exp\bigl(-c(\ln x)^{3/5}(\ln\ln x)^{-1/5}\bigr)</math> for some constant c > 0 by Ford, then
