List Proth primes - MATLAB Cody - MATLAB Central

Problem 51758. List Proth primes

Difficulty:Rate
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

60.0% Correct | 40.0% Incorrect
Last Solution submitted on Sep 11, 2024

Problem Comments

Solution Comments

Show comments
PIVlab surpasses 100K all-time File Exchange downloads
During the past twelve months, PIVlab, a MATLAB Community Toolbox for particle...
4
8
LLMs with MATLAB updated to support the latest OpenAI Models
Large Languge model with MATLAB, a free add-on that lets you access...
2
4

Problem Recent Solvers11

Problem Tags

Community Treasure Hunt

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

Start Hunting!