[Math] How many prime numbers are there in between $1000!+1$ and $1000!+1000$, inclusive

discrete mathematicselementary-number-theoryprime numbers

I know $1000!$ is not a prime number as any number $1000$ or less is a divisor, but how would I know if $1000!+1$ is prime? Any hints?

Also, use the above question to prove that you can find $n$ consecutive composite numbers.

Best Answer

The only non-trivial case is $n=1000!+1$.

However, you can easily check with a computer that $2^{n-1} \not \equiv 1 \pmod n$, thus it's not a prime number (it's just an instance of Fermat primality test). If you want to try this yourself, use an efficient modular exponentiation method.

You may also have a look at FactorDB, which will give you a partial factorization: $$1000! + 1 = 6563 \cdot 1190737 \cdot 115205557790605547 \cdot C_{2541}$$ where $C_{2541}$ is a composite number with 2541 decimal digits.