We prove the assertion of the problem by using the mathematical induction on k.
If k=1 let n=1. Then, nn−m=1−m is divisible by 2 since m is odd. So the assertion holds.
Suppose the assertion holds when k=t, we will show that the assertion holds when k=t+1.
From the induction hypothesis, it follows that there exists a positive integer n0 for which
n0n0≡m(mod2t).
Since n0n0 is odd, n0 is odd. If n0n0≡m(mod2t+1) is satisfied, then this n0 satisfies the assertion for the case of k=t+1. If not, we have n0n0≡m+2t(mod2t+1). Let us show that n=n0+2t will satisfy the condition in this case.
This n is then odd and hence n and 2t+1 are relatively prime, and by Euler's Theorem we have n2≡1(mod2t+1). Consequently, we have
nn=nn0+2t≡nn0⋅n2t≡nn0(mod2t+1).
The binomial expansion of nn0=(n0+2t)n0 gives us
nn0=i=0∑n0ni⋅2itn0n0−i.
Since from the fact that it≥t+1 if i≥2, it follows that 2it≡0(mod2t+1) and we get
nn0≡n0n0+n0C1⋅2tn0n0−1≡(m+2t)+2tn0n0(mod2t+1)≡m+2t(n0n0+1).
Since n0n0+1 is an even number, we get from the above that
nn≡nn0≡m+2t(n0n0+1)≡m(mod2t+1),
which shows that this n satisfies the condition for k=t+1, and this completes the induction.