q = 2 π ( p ) − p
In the above equation, p and q are prime numbers where q > 3 and π ( p ) is the number of primes that are less than or equal to p .
Find the smallest value of q satisfying the above conditions.
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.
Is there a way to solve this problem without trial and error? (I did brute force to get the answer)
Log in to reply
I do not know that. I just found out that it is also called a Solinas prime .
Log in to reply
The next smallest value is 2 1 9 − 6 7 = 5 2 4 2 2 1 .
I guess the natural follow-up question would be whether the number of such pairs ( p , q ) is finite or infinite. This is likely an open question, but it's still interesting to think about.
Log in to reply
@Brian Charlesworth – I wonder if it works only for prime values of π ( p ) .
Log in to reply
@Maria Kozlowska – It doesn't look like it. The next two cases are π ( 8 9 ) = 2 4 and π ( 1 0 1 ) = 2 6 before getting to another prime with π ( 2 8 3 ) = 6 1 . This list ramps up quite quickly, with the 23rd entry being in excess of 5 0 0 0 0 , but if I had to guess I would say that the list in infinite.
Problem Loading...
Note Loading...
Set Loading...
2 1 1 − 3 1 = 2 0 1 7 .
π ( 3 1 ) = 1 1 .
This question was taken from here