Composite Numbers with 1 Prime

79 Views Asked by At

What is the method for finding a long sequence of consecutive composite numbers that has only 1 prime? Specifically, how to find 2011 consecutive natural numbers, 1 of which is prime.

2

There are 2 best solutions below

0
On BEST ANSWER

You can construct a sequence in the following manner:

1)Let us say you want the size of sequence to be n. Then find the largest prime less than $n!+2$.

2)Now all the numbers from $p$ to $n!+n$ are composite .So choose the sequence from this list and you are done.

4
On

Here is a good way to do this.

As MJD pointed out in the comments, it is easy to find 2011 consecutive numbers which are all composite; namely, you can take 2012! + 2, 2012! + 3, ..., up to 2012! + 2012. Now, let $p$ be the smallest prime larger than 2012! + 2012. Then $p-1, p-2, p-3, ..., p-2011$ are all composite (why?) so the sequence $p-2011, p-2010, p-2009, ..., p$ contains exactly 1 prime.