In number theory, an average order of an arithmetic function is some simpler or better-understood function which takes the same values "on average".
Let f {\displaystyle f} be an arithmetic function. We say that an average order of f {\displaystyle f} is g {\displaystyle g} if ∑ n ≤ x f ( n ) ∼ ∑ n ≤ x g ( n ) {\displaystyle \sum _{n\leq x}f(n)\sim \sum _{n\leq x}g(n)} as x {\displaystyle x} tends to infinity.
It is conventional to choose an approximating function g {\displaystyle g} that is continuous and monotone. But even so an average order is of course not unique.
In cases where the limit lim N → ∞ 1 N ∑ n ≤ N f ( n ) = c {\displaystyle \lim _{N\to \infty }{\frac {1}{N}}\sum _{n\leq N}f(n)=c}
exists, it is said that f {\displaystyle f} has a mean value (average value) c {\displaystyle c} . If in addition the constant c {\displaystyle c} is not zero, then the constant function g ( x ) = c {\displaystyle g(x)=c} is an average order of f {\displaystyle f} .