 # Number Theory Questions – Factorial

Have given below one very different question on factorial
Question
1. Given N is a positive integer less than 31, how many values can n take if (n+1) is a factor of n! ?
Correct Answer:
18 values
Explanatory Answer:
The best starting point for this question is to do some trial and error.
3 is not a factor of 2!
4 is not a factor of 3!
5 is not a factor of 4!
6 is a factor of 5!
7 is not a factor of 6!
8 is a factor of 7!
The first thing we see is that n+1 cannot be prime. If (n +1) were prime, it cannot be a factor of n!.
So, we can eliminate all primes.
Now, let us think of all numbers where (n+1) is not prime. In this instance, we should be able to write (n+1) as a * b where a,b are not 1 and (n+1). So, (a,b) will lie in the set { 1, 2, 3, …..n} or, a* b will be a factor of (n + 1)!
So, for any composite (n+1), (n+1) will always be a factor of n! {Is there any exception?}
For any prime number (n +1), (n+1) will never be a factor of n!
The above rule works well even for all the examples we have seen, except when (n+1) = 4. 4 = 2 * 2; So, 4 is not a factor of 3!. But this is the only exception.
Counting on from here, we can see that n can take values 5, 7, 8, 9, 11, 13, 14,15, 17, 19, 20, 21, 23, 24, 25, 26, 27, 29. Essentially, all numbers where N+1 is greater than 4 and is not prime will feature in this list. If N+1 is not prime, we should be able to write is as a product of 2 numbers less than N+1. This will feature in n!. This question is just a different way of asking one to count primes (and then account for the exception of 4)
n can 18 different values.
Now, if we know that there are 25 prime numbers less than 100, can you answer the following question – Given N is a positive integer less than 101, how many values can n take if (n+1) is a factor of n!?

## One comment

1. Apourv says:

Ans = 73.
Since, N<101, we can take N+1=101 as a case too. From 1-101, there are 26 primes (including 101). This means there are 101-26=75 – 1 (1 is not composite nor prime) = 74 composite numbers available for N+1. In this, remove N+1=4 case. Answer = 74-1 = 73.