I want to answer the part of the question, "How could my son be expected to find a prime factor?"

Well, this depends on what your son has been taught, of course. A first thing to notice is that, since 99! is divisible by every prime less than 99, 99! - 1 is not divisible by any of those primes; so 101 is the smallest prime which could be a factor of it. So one can test if 101 is a factor.

In fact, for any prime $p$, $(p-2)! - 1$ is divisible by $p$.
This is a consequence of Wilson's Theorem, which says that a number $p > 1$ is prime if and only if $(p-1)! \equiv p-1 \pmod p$.
In other words,
$$
\begin{align}
(p-1)! - (p-1) \equiv 0 \pmod p \\
(p-1) \bigl((p-2)! - 1\bigr) \equiv 0 \pmod p
\end{align}
$$
so $p \mid (p-2)! - 1$.

I don't know if your son has been told Wilson's Theorem, or is just supposed to figure out that 101 is the smallest possibility and test it with a computer, or use some other technique he's been taught.

As for the question of speed: factoring large integers is a famously hard problem for which no polynomial-time algorithm is known, and everyone would be extremely surprised if such an algorithm were found. For one thing, all modern cryptographic security is based on this problem being hard, and if anyone found a fast solution, encryption would suddenly be worthless; online commerce would screech to a halt; everyone's emails would get leaked; the world would be thrown into chaos.

On the other hand, there are lots of fast probabilistic algorithms to find if a number is "almost certainly" prime very quickly. It can even be determined for certain in polynomial time: the paper proving this is "PRIMES is in P" by Agrawal, Kayal, and Saxena (2004).

1(1) The response by @sn6uv is quite on target. I just wanted to raise a question: Why would one expect that the (relative) speed of

`PrimeQ`

would imply fast factorization? – Daniel Lichtblau – 2015-01-11T20:23:00.9631(2) As for tricks, I think you or your son found a very effective one: just ask for a small number of factors. If any can be found without resorting to the slower big machinery methods, they will be returned. – Daniel Lichtblau – 2015-01-11T20:25:05.800

2@DanielLichtblau: reading an 8th grade math book might lead one to believe that factorizing an integer

isthe only way to find out if it's prime ;-) – Niki Estner – 2015-01-12T08:01:29.7304@nikie They don't teach RSA in 8th grade??? – Daniel Lichtblau – 2015-01-12T15:27:56.730

Thank you everybody! That was truly enlightening. When I was in school encryption was not so hot yet and in grad school I was more concerned about integrating the right way around singularities, not number theory. Thank you again! – Martin Rommel – 2015-01-12T20:39:15.917

`FactorInteger[n! - 1]`

"fails" for the first time for n = 60. Each n < 60 is done in a few minutes. Failure here is defined by "takes more than 8 hours". – Dr. Wolfgang Hintze – 2015-01-13T07:44:31.260By the way, for primality of n!-1 see http://oeis.org/ A002982 and http://mathworld.wolfram.com/FactorialPrime.html

– Dr. Wolfgang Hintze – 2015-01-13T07:55:18.307