1
$\begingroup$

Six prime number form an arithmetic progression, what's the littlest value the last (sixth) term can have?

I saw this question and I didn't know how to solve. If there's like some key to solving to it let me know.

$\endgroup$
  • $\begingroup$ I would write a tool for that. Not counting the trivial cases, the difference between the consecuting primes should be divisible with 30 (least common denominator of 2, 3 and 5). The tool would first use Eratosthenes' Sieve method to find all the primes until a big number (I suggest until around 10million as start), then it would look for the differences with a linear search. The result will be likely some thousands or ten of thousands (my guess). C++ has very nice boolean array implementations. $\endgroup$ – peterh says reinstate Monica May 28 '18 at 0:54
2
$\begingroup$

7, 37, 67, 97, 127, 157 works.

$\endgroup$
  • $\begingroup$ OMG, how did you find it? $\endgroup$ – peterh says reinstate Monica May 28 '18 at 0:58
  • 1
    $\begingroup$ @peterh I thought 7 was a good start. I got a prime list in a book I have and wrote them out, turned out there were six; I had not been sure. Next 187 = 11 * 17 $\endgroup$ – Will Jagy May 28 '18 at 1:00
  • 1
    $\begingroup$ It's worth explaining why $157$ is the least such value. The common difference has to be a multiple of $2$, $3$, and $5$, since otherwise, some term in the progression will be a multiple of one of those. Then it becomes obvious that the initial term can't be $2$, $3$, or $5$, so this is indeed the least such value. $\endgroup$ – Kevin Long May 28 '18 at 1:26
  • 1
    $\begingroup$ @joseestebanbeleñobarrozo this was said very well by peterh in his comment below your question. You could call it the pigeonhole principle. If the common difference were odd, more than one number would be even so not all prime. If the common difference were not divisible by $3,$ some of the numbers would be $1 \pmod 3,$ some would be $2 \pmod 3,$ and some (two of them, actually) would be zero $\pmod 3.$ About 5, if the first prime is 5, then the sixth number is also divisible by 5 (if the common difference is not a multiple of 5). The smallest prime cannot be 2 or 3. ... $\endgroup$ – Will Jagy May 28 '18 at 2:05
  • 1
    $\begingroup$ @joseestebanbeleñobarrozo Let $m$ and $n$ be positive integers with $\gcd(m,n)=1$. Then the sequence $m,2m,3m,\ldots,nm$ when taken mod $n$ will give the integers from $1$ to $n$, each occurring exactly once. For example, let $m=3, n=5$. Then we get $3,6,9,12,15$ which, taken mod $5$ gives $3,1,4,2,0$. Then if the common difference $d$ is not a multiple of $5$, the terms of the sequence will be $a,a+3,a+1,a+4,a+2,a$, so one of the last $5$ terms must be a multiple of $5$, contradicting the terms being prime. By a similar argument, $d$ must be a multiple of $2$ and $3$. $\endgroup$ – Kevin Long May 29 '18 at 19:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.