Differences of residues (mod p)