Tickbox quiz #1 question 13: smallest positive integer that is a factor of a factorial and is not prime

In Prepswift tickbox quiz #1 question 13, it is asked “What is the second smallest positive integer that is NOT a factor of 50! and NOT prime?” And the solution is to find the second prime after 50 (59) and multiply it by 2. This led me to think that the “algorithm” for this kind of questions would always be: find nth prime after number used in the factorial; multiply it by 2 (simplified, since in the question we also try 53*3 to be on the safe side).

However, I thought of the case: 5!. If the question was “what is the smallest positive integer that is not a factor of 5! and not a prime?” and we followed that rationale, we would have arrived at 7*2 = 14. However, the actual answer would be 9, no? Since we need two instances of a 3 to “produce” a 9, but only 1 is present in 5!.

So my question is: is it the case that we should only use that algorithm when the factorial is large “enough” (for instance, for 50!, it is clear that there is no such thing as a prime contained in the range between 1 and 50 that, when squared, is not a factor of this huge factorial and is also smaller than 53*2 = 106)?

My intuition tells me that this algorithm is valid for any factorials larger than 5! (since we need to halve it, get the first prime after the half (in this case, 3 is the first prime after 2.5) and then square it). This is not valid for any factorial smaller or equal to 5!, but from 6! onwards, the resulting number seems to be large enough so that the algorithm works (for 6!, for instance, the first prime after halving it would be 5, that squared equals 25 - which is indeed not a factor of 6!, but is larger than 7*2 = 14).

Am I overcomplicating this or is this the way to go? Apologies for the lenghty question, just wanted to be on the safe side! Thanks in advance!

I think we did say somewhere that these “tricks” are best used for larger numbers - as you corectly pointed out, it does not work for 5!.