Taking n=1, we obtain f(1)1=f(1). Because f(1)>0, we deduce that f(1)=1.
Taking n=2, we obtain f(3)+1=f(2)2, and taking n=3 we obtain 4f(3)+4+f(2)=f(2)f(3)2. Because f(2)=0, this is equivalent to
f(3)+1=f(2)2, and 4f(2)+1=f(3)2
We deduce that 4f(2)+1=(f(2)2−1)2, and therefore
f(2)(f(2)−2)(f(2)2+2f(2)+2)=0
But f(2)=0. Hence f(2)=2 and f(3)=3.
Now assume, for all 1≤k≤n, that f(k)=k. We have
nn−1=1⋅21+2⋅31+⋯+(n−1)⋅n1=f(n+1)n−n⋅f(n+1)1=nf(n+1)n2−1
and therefore f(n+1)=n+1.
This proves that f(n)=n, for all n∈N.