Still not sure about the above.

My proposition:

for all m and n mod p is only true for prime p where

PROOF

For any prime p,

for m and n mod p if and only if

(i)

or

(ii)

or

(iii)

or

(i)

(i.e m is the additive inverse of n mod p)

Cases (i) and (ii) combined cover 2p-1 combinations

Case (iii) covers p-1 combinations (not including 0, 0)

Case (iv) covers p-1 combinations

So total number of combinations covered are 4p – 3

The total number of combinations for m and n mod p are

Since we require all combinations to be covered, we require

and this is when

so

is only true for all m and n mod p when