adding a special case for factorial

Adding special case to detecting when modulo of a factorial is 0. currently if we ask for `factorial(n)%k `, we have no way to know if k lies in the category `(1, n]`, so could only implement for the special case `k == n`.
if other in self.free_symbols?