Let g(n)=nf(n) for n≥1 and g(0)=0. We note that, for k=1,…,n,
⌊kn⌋−⌊kn−1⌋=0
if k is not a divisor of n and
⌊kn⌋−⌊kn−1⌋=1
if k divides n. It therefore follows that if d(n) is the number of positive divisors of n≥1 then
g(n)=⌊1n⌋+⌊2n⌋+⋯+⌊n−1n⌋+⌊nn⌋=⌊1n−1⌋+⌊2n−1⌋+⋯+⌊n−1n−1⌋+⌊nn−1⌋+d(n)=g(n−1)+d(n)
Hence
g(n)=g(n−1)+d(n)=g(n−2)+d(n−1)+d(n)=⋯=d(1)+d(2)+⋯+d(n)
meaning that
f(n)=nd(1)+d(2)+⋯+d(n).
In other words, f(n) is equal to the arithmetic mean of d(1),d(2),…,d(n). In order to prove the claims, it is therefore sufficient to show that d(n+1)>f(n) and d(n+1)<f(n) both hold infinitely often.
We note that d(1)=1. For n>1,d(n)≥2 holds, with equality if and only if n is prime. Since f(6)=7/3>2, it follows that f(n)>2 holds for all n≥6.
Since there are infinitely many primes, d(n+1)=2 holds for infinitely many values of n, and for each such n≥6 we have d(n+1)=2<f(n). This proves claim (b).
To prove (a), notice that the sequence d(1),d(2),d(3),… is unbounded (e. g. d(2k)=k+1 for all k ). Hence d(n+1)>max{d(1),d(2),…,d(n)} for infinitely many n. For all such n, we have d(n+1)>f(n). This completes the solution.