If $n = 51! +1$, then find number of primes among $n+1,n+2,\ldots, n+50$

First you need to review the definition of the factorial: $$m! = \prod_{i = 1}^m i = 1 \times 2 \times 3 \times \cdots \times m.$$ This means that $m!$ is divisible by 2, by 3, by 4, by every number up to $m$.

Therefore $51!$ is divisible by 2, by 3, by 4 and by every number up to 51 (and a few others greater than 51, but you don't need to worry about those for this problem).

Then $51! + 2$ is also divisible by 2.

$51! + 3$ is also divisible by 3.

$51! + 4$ is also divisible by 4.

And so on and so forth to $51! + 51$, which is divisible by 51.

Maybe $51! + 1$ is prime. Maybe so is $51! + 53$. But in between those two numbers, there are zero primes.


The number $51!$ has as non-trivial factors every natural number preceding $51$.

Thus any $51! + 2$, $51! + 3$, etc. will be divisible by $2,3,4,\cdots$ respectively. $$n=51! + 1$$ $$n+a = 51! + (1+a) = \left(\frac{51!}{1+a}+1\right)\cdot (1+a)$$ If $1\leq a \leq 50$ then $\frac{51!}{1+a}$ is an integer and so $a+1$ divides $n+a$. (and they are obviously not equal, and $a+1\neq 1$).

Thus there are no primes in the range specified!


In addition to Michael Hardy's answer, which precludes all of n+1 to n+50, you can also prove that n is in fact composite as well using Wilson's Theorem which states that a number n is prime if and only if (n - 1)! ≡ (n-1) mod n.

Here, n is (51! + 1), so (n-1)! = 51!!. Therefore, (51! + 1) is prime iff 51!! ≡ 51! mod (51! + 1). However, we now that (51!+1) is of course a factor of 51!! since (51! + 1) < 51!!, so it is impossible that 51!! would be congruent to anything other than 0 modulo (51! + 1). Therefore, 51! + 1 is also definitely not prime.