Problem 51758. List Proth primes
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
Dyuman Joshi
on 2 Jun 2022
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
ChrisR
on 7 Jun 2022
Good question, Dyuman. Please use the largest m possible.
Dyuman Joshi
on 17 Jun 2022
Thanks for the clarification, Chris.
Nice question!
Solution Comments
Show commentsProblem Recent Solvers11
Suggested Problems
-
6863 Solvers
-
21891 Solvers
-
82 Solvers
-
Similar Triangles - find the height of the tree
444 Solvers
-
Piecewise linear interpolation
556 Solvers
More from this Author290
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!