3

How to find 100 consecutive composite numbers? After many attempts I arrived at the conclusion that to find $m$ consecutive composite numbers we can use this

$n!+2, n! +3, ..., n! + n$

where $n! + 2$ is divisible by $2$, $n! + 3$ is divisible by $3$ and so on...

and where $m$ = $n-1$

Thus $n!+2, n! +3, ..., n! + n$ tells that there are $(n-1)$ consecutive numbers. However, there seems to be some gaps or incompetence. For example: $4!+2, 4! +3, 4! +4$ $→$ $26, 27, 28$.

Although it's right there are for sure smaller numbers such as $8, 9, 10$ and $14, 15 ,16.$ Is there another method for solving such a problem mathematically? Is it a correct method or have I misunderstood it?

Hale
  • 153
  • instead of taking $n!$ consider taking the product of the primes less than or equal to $n$ which is know to be less than $4^{n+1}$. – Asinomás Jun 22 '21 at 18:07
  • Where is the gap or incompetence in your example? – Dávid Laczkó Jun 22 '21 at 18:13
  • If $p_k$, for $k=2,3,...,n+1$ denote the smallest prime dividing $k$. Then you can solve the system of congruences $x+k-2\equiv0\pmod{p_k}$, for $k=2,3,...,n+1$ using the Chinese Remainder Theorem. Observe that while some of the congruences have the same modulus, by the definition of $p_k$ they are actually redundant. So, after removing the redundant ones the system ends up with congruences with moduli that are different primes. – plop Jun 22 '21 at 18:14
  • 3
    Take into account that the argument with the $n!+k$ is not aiming for small solutions, but a small proof. – plop Jun 22 '21 at 18:21
  • @Yorch I don't understand. Why? Suppose $n = 4$. The product of the primes less than $4$ is $6$. It is less than $4^5$ for sure but what does it say? – Hale Jun 22 '21 at 18:23
  • It's a smaller option than $n!$, instead of taking $n!$ take the product of the primes that are less than or equal to $n$. – Asinomás Jun 22 '21 at 18:23
  • 1
    Oh I get it! That way we get $8, 9, 10$ right? Why does it work though – Hale Jun 22 '21 at 18:33
  • @plop Thanks for your comment but I can apologetically not understand it. My mathematical knowledge is yet developing – Hale Jun 22 '21 at 18:35
  • Look at an example. Let $n=5$. We get $p_2=2,p_3=3,p_4=2,p_5=5, p_6=2$. So, we want to find $x$ such that $2|x$, $3|x+1$, $2|x+2$, $5|x+3$ and $2|x+4$. Removing the redundant conditions we get that we need to find $x$ such that $2|x$, $3|x+1$ and $5|x+3$. The Chinese Remainder Theorem gives you that this has solutions and the proof of the theorem how to find all such solutions. – plop Jun 22 '21 at 18:42
  • @Yorch The definition is in my first comment. – plop Jun 22 '21 at 18:46
  • @Yorch It is a different solution. – plop Jun 22 '21 at 18:49
  • @Yorch Homework to you. – plop Jun 22 '21 at 18:51
  • Does your method yield smaller numbers than what I'm proposing? – Asinomás Jun 22 '21 at 18:53
  • @Yorch Clearly. Your numbers are all larger than the product of the primes up to $n$. The Chinese Remainder theorem will find a remainder modulo that number for the value of $x$. – plop Jun 22 '21 at 19:00
  • sounds good${}{}{}$ – Asinomás Jun 22 '21 at 19:02
  • Do you know approximately how much smaller they usually are? – Asinomás Jun 22 '21 at 19:07
  • 2
    @Emily If you found this method yourself without ever having heard of it before, then congratulations! In fact, this way it is usually proved that there are arbitarily large prime gaps. Of course, the gaps occur already for much smaller numbers. A good survey gives the "prime gaps" article from Wikipedia. – Peter Jun 22 '21 at 19:12
  • @plop, so after we have found that $x=2$ in your example $n=5$ which are the numbers we want? – Asinomás Jun 22 '21 at 19:17
  • 1
    @Peter thank you for the information! – Hale Jun 22 '21 at 19:44
  • @plop I am beginning to doubt your method does not "Clearly" provide numbers smaller than the product of the primes under $n$. Please help me if possible. – Asinomás Jun 24 '21 at 13:05

2 Answers2

3

In general, finding the smallest such numbers would be not easy. Primes are, at times, tough to deal with. However, it can be made simpler. Rather than taking $n!$, you may take the LCM of the first $n$ numbers.

For example, for $n=5$, take $LCM(1,2,3,4,5)=60$ instead of $5!=120$. So, instead of $122,123,124,125,126$, you take $62,63,64,65,66$.

Better than this, take the product of the primes not exceeding $n$.

For example, foR $n=5$, take $2\times 3\times 5=30$. In this case, you take $32,33,34,35,36$.

F. A. Mala
  • 3,547
  • 5
  • 31
0

If it was allowed to do 2 primality test, then you could define
$n = f(x)$
where $f$ is either factorial or primorial, and do a primality check for $n - 1$ and $n + 1$. If those are not primes, then you have
$n - x, ..., n - 3, n - 2, n - 1, n, n + 1, n + 2, ..., n + x$ all composite numbers. If $x$ is odd $> 1$, then you also have $n - x - 1$ and $n + x + 1$ composite, as they are even.
The smallest case if I'm not mistaken is $x = 5$ letting $f$ be factorial, with which we can have 13 consecutive composite numbers: $5! = 120$, $7 \mid 119$, $11 \mid 121$, so it means that from $120 - 5 - 1 = 114$ to $120 + 5 + 1 = 126$ all numbers are composite.