Find the next such set of prime numbers ending in 1, 3, 7, 9.

number theoryprime numbers

I was checking this number theory exercise:

The numbers $11, 13, 17, 19$ are four odd integers ending in $1, 3,
7, 9$ that lie between two multiples of $10$. Find the next such set of prime
numbers ending in $1, 3, 7, 9$.

By trying several numbers I found the answer is $101,103,107,109$ but
I have been unable to find such numbers by a mathematic approximation or a different way.

If you have another way it will be really appreciated.

Best Answer

The best optimization you can do by elementary means is to note that, like Berci said, with one exception, all these prime quadruples surround odd multiples of 15.

Algebraically, given $n \equiv 15 \pmod{30}$, we have $p = n - 4$, $p + 2 = n - 2$, $p + 6 = n + 2$ and $p + 8 = n + 4$.

So then there's no point in checking the 20s, because 21 is a nontrivial multiple of 3. Nor the 30s, for, even though 31 is prime, 33 is a nontrivial multiple of 3.

But do look at the 40s: we have 41, 43, 47... oh, dang, $49 = 7^2$. Actually, this suggests one other optimization, to swap 30 out for 210.

Then $n$ can be $15, 105, 195 \pmod{210}$. Looking at Sloane's http://oeis.org/A007530, you will see that except for 5, the lowest number $p$ of the prime quadruple is $11, 101, 191 \pmod{210}$.

Related Question