Adding Numbers to Factorial

In here 30!+29 is not a prime because it is a multiple of 29 or divisible by 29
My question is what about 30!+31 or 30!+72. is it a prime number? How can I attract this type of quotation if ask me [n!+prime number getter than n] (n is a positive integer)

It’s definitely a tricky question. For expressions like n! + (n + 1), especially when testing for primality, there’s no hard-and-fast rule that always applies.

Take your example of 30! + 31, for example. I myself would be tempted to think it’s prime — but then I remember the sheer magnitude of such a number (which, by the way, ends in 1 since 30!, like all factorials beyond 4!, ends in 0). That alone makes me question whether only 1 and itself could be factors. I ran a program to check, and it turns out the number is composite.

On the other hand, 30! + 72 is easier: it ends in 2, making it even — so it’s immediately divisible by 2 and thus not prime.

Now, I’m not guaranteeing that ETS wouldn’t include a question like this — I’m not ETS. But I do believe they’d be unlikely to test this kind of problem unless there were a clear rule, pattern, theorem, or concept you could use to arrive at the answer logically. Please note that this is my personal opinion and not necessarily shared or endorsed by anyone at GregMat.