In this question, I used the trick as taught. Looking for next big prime no. which is 7 and then finding out factors of 7 so the smallest would be 14 but the correct answer is 9 which logically makes sense so does that mean this trick won’t work on small numbers?
Hey, I am confused as to why would you choose 7 since the question specifically mentions non-prime numbers.
The way I went about this question is first write the expansion of 5! = 5 * 4 * 3 * 2 * 1
Then I started listing the non prime numbers beyond 5 since all numbers before that are factor by default.
6 → 2 * 3
7 → Prime
8 → 4 * 2
9 → 3 * 3, we have one three but not another one hence this is the answer. Hope this helps!
Hey, I chose 7 because I am referring to the trick taught in non factors of factorial in which to find composite non-factors you chose the next big prime numbers in this case 7 and find their factors so I want to understand if this trick only works on bigger factorials ? So, I agree with your approach but I also want to understand if the trick taught to us has limitations of some sorts
I wouldn’t really call it a limitation but rather its usage doesn’t apply here since the question mentions non-prime. If that part was missing in the question then your approach would be correct.
yeah but 14 is non-prime if you use the trick. It gives you 14 as the smallest non-factor but we if do it by the brute force it is 9 so it is a limitation only then or am I misunderstanding the question?
I am referring to this trick in the quant mountain
You get the idea. NOTE that this trick really only works for factorials greater than or equal to 10!10!. If it’s a small factorial, you’re better off finding the factors using a more brute-force, list them all out approach.