12 1. Arithmetic Functions

The last inequality yields asymptotic estimates for the summatory functions

of log(m) and 1/m. The first of these is a weak version of Stirling’s formula.

Proposition 1.7. The estimates

n

m=1

log(m) = n log(n) − n +

log(n)

2

+ 1 + Rn

and

n

m=1

1

m

= log(n) + γ +

1

2n

+ Sn

hold for all positive integers n with |Rn| ≤ 3/16 and |Sn| ≤

3/(16n2).

Proof. The partial summation formula of Proposition 1.5 gives

n

m=1

log(m) = n log(n) −

n

1

[u]

du

u

= n log(n) − n + 1 +

1

2

log(n) +

n

1

S(u)

du

u

when f(n) ≡ 1 and g(x) = log(x). The last integral is bounded by 3/16

in absolute value by Proposition 1.6. Using the partial summation formula

again yields

n

m=1

1

m

= n·

1

n

−

n

1

[u] −

du

u2

= 1 + log(n) +

1

2n

−

1

2

−

∞

1

S(u)

du

u2

+

∞

n

S(u)

du

u2

.

The last term is bounded by

3/(16n2)

by Proposition 1.6.

The real number γ = 0.5772 . . . is known as the Euler-Mascheroni con-

stant. It is unknown whether this is irrational. Note that Proposition 1.7

yields the version T(x) = x log(x) − x + O(log(x)) of Stirling’s formula that

is most commonly applied in analytic number theory.

Proposition 1.8 (Euler-Maclaurin summation formula). If A B are

integers and f a continuous function on the interval [A, B] with f piecewise

continuous there, then

B

n=A

f(n) =

B

A

f(u) du +

f(A) + f(B)

2

+

B

A

S(u)f (u) du

with S(u) = u − [u] − 1/2 the sawtooth function.