This works for 3 as well, but definitely not for any modulus in general.