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
-
Sort a list of complex numbers based on far they are from the origin.
5636 Solvers
-
Back to basics 23 - Triangular matrix
1001 Solvers
-
336 Solvers
-
1423 Solvers
-
Sums of cubes and squares of sums
258 Solvers
More from this Author279
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!