As of datenum 738289, three of the twenty largest known prime numbers are Proth primes, prime numbers of the form
with
. For example, taking
and
gives 3, the first Proth prime, and taking
and
gives 97, the sixth Proth prime. The number 199 is prime but not a Proth prime because
. The number 49 is a Proth number (
,
) but not prime.
Write a function to list the Proth primes between two limits a and b. Also provide the values of k and m.
Optional: Values of k for which no values of
are prime are called Sierpinski numbers. Show that 78,557 is the smallest Sierpinski number. For more, see this page.
Solution Stats
Problem Comments
3 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers13
Suggested Problems
-
2176 Solvers
-
1247 Solvers
-
Sum all integers from 1 to 2^n
17389 Solvers
-
16291 Solvers
-
7963 Solvers
More from this Author321
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Chris, what if there are multiple pairs of (k,m) that result in a particular proth number, which pair should we report?
For example -
k=4, m=2, p=17
k=2, m=3, p=17
k=1, m=4, p=17
also
k=1, m=2, p=5
k=2, m=1, p=5
Good question, Dyuman. Please use the largest m possible.
Thanks for the clarification, Chris.
Nice question!