6

I have already seen a duplicate of this. But I was not able to follow along.

So I was asked this question by my maths teacher during a sequence and series lecture.

  1. Can you devise $100$ consecutive natural numbers with no primes.

  2. Additionally, Is it possible to have $1000$ consecutive natural numbers with exactly $12$ primes between them?

I have an intuition that we have to form a recurrsive relation and solve it. But I am stuck.

I also tried making a $10*10$, having $50$ multiplies of $2$, $33$ multiples of $3$ and so on trying to generalize but wasn't able to come up with a solution.

Any hints would be really helpful. Thank you.

prog_SAHIL
  • 2,643
  • 1
    For the first question you can take a number $n>0$ such that it has a comon divisor with all numbers numbers less than 100. Then $n+i$ is not prime for $i=0,1,...,99$, isn't it? – xarles Aug 06 '18 at 15:04

4 Answers4

13
  1. $101!+2,101!+3,...,101!+101$ has no primes (because $i|101!+i$ for $2\leq i\leq 101$)
  2. Let $f(n)$ be the number of primes in $\{n,...,n+999\}$. Since $f(1)>12$ and $f(1001!+2)=0$ (for the same reason as above) and $|f(i+1)-f(i)|\leq1$, there exists $i\in (1,1001!+2)$ with $f(i)=12$.
Akababa
  • 3,169
7

For the second, note that we were not asked to display such an interval, just to prove one exists. You can use the technique of the first to show there is a run of $1000$ numbers with no primes. Now note that there are more than $12$ primes in $[2,1001]$. Imagine stepping through the intervals $[2,1001], [3,1002], [4,1003],\ldots$ until we get to the interval with no primes. Each interval has either one more, the same number, or one less prime than the one that came before. As we started above $12$ and get to $0$ somewhere there is at least one that has exactly $12$. I have no idea where it is.

Ross Millikan
  • 383,099
  • This really helped. Thank you. – prog_SAHIL Aug 06 '18 at 15:16
  • Also for $n\geq{2}$, can we always say that $n!+1$ is prime? – prog_SAHIL Aug 06 '18 at 15:18
  • A counter example will be $5!+1$? How do we know if $101!+1$ is prime or not? Just out of curiosity. Having $101$ consecutive numbers won't hurt right? – prog_SAHIL Aug 06 '18 at 15:20
  • No. $4!+1=25$ for example – Ross Millikan Aug 06 '18 at 15:21
  • Numbers $n$ such that $n!+1$ is prime are fairly rare. The first few are listed in http://oeis.org/A002981 – Ross Millikan Aug 06 '18 at 15:37
  • Alpha says $137$ divides $101!+1$ and says the other factor is composite. It is easy to prove a number is composite. The Fermat test works most of the time-it is always right when it claims a number composite but can say a number might be prime when it is composite. – Ross Millikan Aug 06 '18 at 15:43
  • So this means $101!+1$ to $101!+100$ is also a viable answer right? – prog_SAHIL Aug 06 '18 at 16:05
  • Yes, it would be. There are infinitely many more. – Ross Millikan Aug 06 '18 at 16:16
  • @RossMillikan "As we started above 12 and get to 0 somewhere there is at least one that has exactly 12" This happens because in some intervals the number of primes is one less than the number of primes in the interval before, isn't it? – alu Dec 21 '22 at 05:11
  • 1
    @alu: and in some intervals there is one more. You have a sequence of numbers that starts above $12$ and steps by $0, \pm 1$ to get to $0$. It can't jump over $12$, so it must hit it at least once. – Ross Millikan Dec 21 '22 at 05:33
  • @RossMillikan Thank you, this is a nice explanation. I knew it also increases in some cases but if it kept increasing or had no increase, it couldn't get from more than 12 to 0, so because sometimes it decreases that's why it can decrease back to 0. It helped that you said, it can't jump over, must hit it at least once. – alu Dec 22 '22 at 07:20
2

The $(n+1)!$ proof is very easy to understand, but it can create the impression that gaps of $100$ primeless numbers are almost impossibly rare. For example, $101!$ is on the order of $10^{160}$. In actuality, gaps of $100$ primeless numbers occur at much smaller magnitudes.

The same logic of the $(n+1)!$ proof can be applied to the lcm (least common multiple) function, which defines the smallest number divisible by a given set of numbers. For $k=$lcm $(2,3,..101)$, it is plain to see that $i\mid (k+i), 2\le i\le 101$ since by the definition of lcm, $i\mid k$. The lcm function returns a number much smaller than the corresponding factorial. If my back of the envelope estimate is correct, lcm $(2,3,..101)$ is on the order of $7\cdot 10^{42}$. Not small, but over $117$ orders of magnitude smaller than the factorial.

A slightly smaller number can be obtained by employing primorials. For $k=n\#$ it can be seen that $\gcd {i,(k+i)}>1, 2\le i\le n$ since every $i$ will have some factor in common with both $n\#$ and itself.

In the real world, primeless gaps of length $n$ tend to occur at yet lower magnitudes than these methods identify.

  • 1
    Can you explain how $k=n#$ helping ? – tarit goswami Aug 06 '18 at 17:47
  • 1
    $n#$ is the primorial function; it equals the product of all primes less than or equal to $n$. Every number between $2$ and $n$ is either (1) a prime less than or equal to $n$ or (2) has two or more prime factors less than $n$. In the first case, it is explicitly a factor of $n#$. In the second case, it is not relatively prime to one or more of the factors of $n#$. – Keith Backman Aug 06 '18 at 18:02
2

I did the first question a different way:

  • look at any $100$ consecutive numbers, they will end in the digits $01,02,\cdots,00$

  • we need to find a number $n$ such that its ending digits per above are nonprimes and accordingly we can add this to a “base” number to get our solution. I’m not explaining very well but follow through the below

  • All numbers in this sequence ending with $2, 4, 6, 8, 0$ are even and hence nonprimes

  • Similarly all numbers ending in $5$ is nonprimes as long our starting number $n$ is $> 5$

  • To cover off on numbers with last two digits summing up to a factor of $3$, we need to ensure the starting number n is divisible by $3$ and ends with a zero. If it does not, simply multiply by $30$ to get this.

  • To cover off on Numbers ending with $1$ just make sure the starting number ends with $0$ and is a multiple of $11, 31, 41, 61, 71, 91, 101$; where I have excluded $21, 51, 81$ as they are divisible by $3$. $91$ is not a prime so we can remove it from this list

  • Do similar for $7$ - numbers to multiply are $7, 17, 37, 47, 67, 97, 107$

  • We also have cover off on $19, 29, 59, 79, 89, 13, 23, 43, 53, 73, 83$

  • Thus the following number solves the question: $30 \times 7 \times 17 \times 37 \times 47 \times 67 \times 97 \times 107 \times 11 \times 31 \times 41 \times 61 \times 71 \times 101 \times 19 \times 29 \times 59 \times 79 \times 89 \times 13 \times 23 \times 43 \times 53 \times 73 \times 83$

What was important for me here was that we were looking at a decimal representation of primes, since we wanted to find $100$ sequential numbers. Hence, I decomposed the problem into solving for various decimal representations of natural numbers that are not prime

Hope it helps!