What condition what must be satisfied in order for 1/p to be expressed in base q instead of base 10 and still have a period of p - 1? [SEP] The fraction 1/p expressed likewise in base q (rather than base 10) has similar effect, provided that p is not a prime factor of q. Wilson's theorem says that an integer p > 1 is prime if and only if the factorial (p − 1)! + 1 is divisible by p.