it's.... k^(p-1) = 1 ( mod p ) for any k not a multiple of p. and k^p = k ( mod p ) for any integer k.