You don't always get a prime. For example, 4! = 2 * 3 * 4 = 24, 24 + 1 = 25, 25 is not prime. The point is that N! + 1 is not divisible by any number from 2 to N (always leaves a remainder of 1), so either it is prime, or it is divisible by something larger than N!, therefore larger than N. In the case of 25, it is divisible by 5 (> 4).