Factorial and arithmetic operations