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 k 2^m+1 with k <= 2^m. For example, taking k = 1 and m = 1 gives 3, the first Proth prime, and taking k = 3 and m = 5 gives 97, the sixth Proth prime. The number 199 is prime but not a Proth prime because k = 99 > 2^m = 2. The number 49 is a Proth number (k = 3, m = 4) 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 k 2^m + 1 are prime are called Sierpinski numbers. Show that 78,557 is the smallest Sierpinski number. For more, see this page.

Solution Stats

57.89% Correct | 42.11% Incorrect
Last Solution submitted on May 02, 2023

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers10

Suggested Problems

More from this Author244

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!