It is known that if n divides a−b, then an−bn is divisible by n2. Now, choose z≡x(modn) and y≡t(modn). Then
xn+yn−(zn+tn)=(xn−zn)+(yn−tn)≡0(modn2)
Thus, for z,t belonging to {0,1,…,n−1}, we must calculate maximal number of different values of zn+tn(modn2). Then, there are x,y such that xn+yn≡zn+tn(modn2). These numbers are at most 2n(n+1). Therefore, there are at least n2−2n(n+1)=2n(n−1) different values for m.