Lemma. If x≥1, then

∑n≤x1n= log ⁡x+γ+O(1x),

where γ∈ℝ is Euler’s constant, which is given by γ=lim⁡N→∞∑⁡k=1N1k− log ⁡⁡N.