# Prove that $20!+23$ is a composite number

While solving problems in the theory of congruence, I came across the following problem: Prove that for each $k\in \mathbb{N}$ there exists $k$ consecutive composite positive integers.

Now the solution to the above problem is to consider $(k+1)!+2, \cdots, (k+1)!+(k+1)$ and to show that each of them is composite.

After this, while i was checking the primality of $20!+18, 20!+19, \cdots, 20!+23$ i got stuck at 20!+23. All those previous numbers were easy to show they were composite but I found no elementary approach to show $20!+23$ is composite.

How can we show that this number is composite using elementary techniques from the theory of congruence ?

• It divisible by $37$. The rest is obvious. Sep 3, 2017 at 11:32
• Check divisibility by primes larger than 20: ... 23, 29, ... pretty soon you will get one that works. Sep 3, 2017 at 11:32
• Note that the argument solution you're quoting stops at $20!+20$. It is just coincidence that $20!+21$ and $20!+22$ happen to be composite, and equally a coincidence that $20!+23$ is. Sep 3, 2017 at 11:47
• oeis.org/A037152 might be of interest. Sep 3, 2017 at 12:09
• See oeis.org/A037153 also. Sep 3, 2017 at 12:34

Note that $20!$ is divisible by $14\equiv -23$ modulo $37$. Show that $20!/14\equiv 1$ modulo 37.

P.S. In order to find the prime 37, try prime $p \in (23,23+20]$ and check if $20!/(p-23)-1$ is divisible by $p$.

• Why that interval ? Is there any special formula to find such ?
– KON3
Sep 3, 2017 at 11:46
• @Anjan3 No prime $\leq 23$ works because $20!+23\equiv 0$ modulo $p$. The upper bound is just to be sure that $20!/(p−23)$ is an integer. Sep 3, 2017 at 11:56
• Kindly please help me. I am unable to understand. 20! is divisible by 14. And 14 $\equiv$ -23 mod 37. Why should we show $(20! / 14) \equiv 1 (mod 37)$ ?
– KON3
Sep 7, 2017 at 1:18
• @Anjan3 If so $20!/14\cdot 14+23\equiv 1\cdot (-23) +23=0$ modulo $37$. Sep 7, 2017 at 4:15
• Indeed, why that interval? There are primes $p\in(31,31+20]$, but none of them divide $n=20!+31$, but $n$ is composite. Nov 25, 2017 at 16:37

HINT: Show that $$20!\equiv 14\mod 37$$

• I know it is divisible by 37. But suppose we don't know that. Then how to prove the number is composite ?
– KON3
Sep 3, 2017 at 11:34
• thats the Problem i would try prime numbers $$2;3;5;7;11;13;...$$ and so on, how found Euler the number $641$ which is is a factor of $$4294967297$$? Sep 3, 2017 at 11:38

Let $20!+23$ divisible by $p$, where $p$ is a prime.

Thus, $p>23$ and we need to check $p\in\{29,31,37\}$ and checking of $p=37$ gives that $20!+23$ is a composite number.