What is the smallest prime number that cannot be written in the form p + q p q + 1 , where p and q are prime numbers?
For example, 2 can be written as 3 + 5 3 ∗ 5 + 1 .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Sir, but how did you find that 73 is the answer? Did you try for all primes? Is a modular solution possible? Thanks... :D
Log in to reply
Yes, I had to test each prime in ascending order until I found one for which there were no suitable values for p , q . It only takes a minute or two for each prime with the process outlined above, but with 7 3 being the 2 1 st prime it does become tedious. I don't know of any modular solution; part of the reason I posted the question was to see if anyone could come up with a faster method, possibly involving modular arithmetic.
Log in to reply
And why did you have a hope that such a prime may even exist? And how did you come up with only p + q p q + 1 ? I just want to know what ppl think before making a problem...
Log in to reply
@Satvik Golechha – I just noticed that
2 = 3 + 5 3 ∗ 5 + 1 and 3 = 5 + 7 5 ∗ 7 + 1 ,
which made me wonder if I could keep doing this with successive primes. It doesn't continue happening with successive primes, but it can be done with primes in general, up to and including 7 1 . The process works with some composites as well, (e.g., 6 = 1 1 + 1 3 1 1 ∗ 1 3 + 1 , 8 = 1 1 + 2 9 1 1 ∗ 2 9 + 1 ), but I find primes more "interesting" so I restricted the question to finding the smallest prime.
Log in to reply
@Brian Charlesworth – Thanks sir. One final curiosity... next prime after 73?
Log in to reply
@Satvik Golechha – Well, 7 3 is the only 2-digit prime that cannot be written in this form, but if I were to go further I would need to write a program, as this could take a while by hand. The next question would be: Is the set of primes that cannot be written in this way finite or infinite? I have no idea, so I may ask this question in a note and see if anyone has any ideas to share.
Log in to reply
@Brian Charlesworth – 73
107
131
157
173
179
193
227
263
277
283
I know this is kind of a late reply but there are the first few primes that cannot be written in that form. I wrote up a program that checked them. From the looks of things I would say that the set that cannot be written in that way is infinite.
Log in to reply
@Wen Z – Great! Thanks for writing the program. It's interesting that 7 3 is the only prime between 0 and 1 0 0 while there are 6 between 1 0 0 and 2 0 0 , more than I expected. I agree, the case for infinite looks strong. :)
Log in to reply
@Brian Charlesworth – I've also run it for more primes - and it seems that there is on average 4 'unexpressible primes' every 100 numbers up to about 5500 or something around there.
For every (p q+1)/(p+q)=k, k being the prime number we get p q+1=kp+kq =>(p-k)(q-k)=k^2-1 =>(p-k)(q-k)=(k-1)(k+1) Note "having p=2k-1 and q=2k+1 we prove that we can write every integer like that" Now we just take every number and check its divisors for a solution. Indeed we get 73.
I was on the right track then. But wasn't patient enough.
Proof here: p + q p q + 1 = r ⇒ p q + 1 = r ( p + q ) ⇒ p q − p r − q r + 1 ⇒ ( p − r ) ( q − r ) − r 2 + 1 = 0 ⇒ ( p − r ) ( q − r ) = r 2 − 1 or j k = r 2 − 1 and p = j + r and q = k + r .
Nice factoring, that should do it!
I have no formal proof either, but a little shortcut for programatically testing:
WLOG p < q .
Then 2 p = 2 q p q < p + q p q < p + q p q + 1 = p + p + q 1 − p 2 < p . So for the given prime r = p + q p q + 1 we have to check whether there is a prime q = p + r p r − 1 for any p satisfying r < p < 2 r .
No proof here, but I solved this by writing a program that uses the first 94 primes as variables p and q in the equation. Any prime that came up as a result of the equation was eliminated. 73 came up as the smallest remaining prime after this process of elimination. (Originally I had tried my program with just the first 20 primes and gotten 37 as a result, but it turns out 41 and 379 [the 75th prime] can be used as p and q to get 37, so I kept increasing the list of primes.) Not an elegant proof, but a solution nonetheless.
I'm very interesting in seeing a mathematical proof of this equation.
Problem Loading...
Note Loading...
Set Loading...
The following is a test one can use to see if a prime r can be written in this way.
Look at the divisors k of r 2 − 1 that are less than r and then find j such that r 2 − 1 = k j .
Then the prime r can be written in the desired way if and only if both r + k and r + j are both prime for some pair k , j . (Insert proof here .... sometime). We will then have p = r + k and q = r + j such that
p + q p q + 1 = 2 r + k + j r 2 + r ( k + j ) + k j + 1 = 2 r + k + j 2 r 2 + r ( k + j ) = r .
So, for r = 7 1 we have r 2 − 1 = 5 0 4 0 = 2 4 ∗ 3 2 ∗ 5 ∗ 7 .
The divisors k < 7 1 for which 7 1 + k is prime are 2 , 8 , 1 2 , 1 8 , 3 0 , 3 6 , 4 2 , 5 6 and 6 0 . The respective values of j are 2 5 2 0 , 6 3 0 , 4 2 0 , 2 8 0 , 1 6 8 , 1 4 0 , 1 2 0 , 9 0 and 8 4 .
Now of these we have that 7 1 + j is prime for j = 2 5 2 0 , 6 3 0 , 4 2 0 , 1 6 8 , 1 4 0 and 1 2 0 . So we have a choice of p , q in the case of r = 7 1 . For example, with k = 4 2 and j = 1 2 0 we have primes p = 1 1 3 and q = 1 9 1 .
We can go through this process for all primes less than 7 1 as well and successfully find suitable values for p and q . However, for r = 7 3 , we find no such primes p , q , and so 7 3 is the smallest prime that cannot be written in the desired way.
Note: Testing all the primes this way is a bit tedious; a computer program might be of use here. If anyone has a more elegant way of showing that 7 3 is the answer then I would be interested to see your method.