Taking n=1, we obtain f(f(m)+2)=f(f(m))+2, for all m∈N. Taking m=1, we obtain f(2+f(n))=4+f(n), for all n∈N. Therefore
f(f(n))=f(n)+2,for all n∈N.
Because f(2)=f(f(1))=f(1)+2=4, we prove by induction that
f(n)=n+2
for all positive even integer n≥2.
Because the set {f(1)}∪{f(2),f(4),f(6),…} contains all even positive integers and because f is an injective function, the image by f of any odd number n≥3 is an odd number.
Let
k=min{f(n)∣f(n) is an odd integer }
and let f(n0)=k for some odd positive number n0≥3. We prove by induction that
f(n)=n+2,for any odd number n≥k.
Indeed, f(k)=f(f(n0))=f(n0)+2=k+2. Assume that f(n)=n+2, for some odd number n≥k. We deduce that f(n+2)=f(f(n))=f(n)+2=(n+2)+2.
Clearly, n0<k, otherwise k=f(n0)=n0+2≥k+2, which is impossible. Therefore,
{f(n0),f(k),f(k+2),f(k+4),…}={k,k+2,k+4,k+6,…}
covers all possible odd values taken by f. Because, f is injective, and f(3),f(5)≥k are odd integers, we deduce that n0=3,k=5 and
f(n)=n+2
for all positive odd integer n≥2.