Problem 46047. Identify Wagstaff primes
The numbers 3, 43, and 2731 are examples of Wagstaff primes.
Write a function to identify Wagstaff primes in the input.
Solution Stats
Problem Comments
-
2 Comments
William
on 18 Jul 2020
I think the answer to problem 7 should be [0 1 1 1 1 1 1 1 1 0 1 0], because q=31 leads to a Wagstaff prime.
ChrisR
on 18 Jul 2020
Yes, you're right. Thanks, William. I've corrected the test suite. I should have known there was a problem because Athi's solution stepped around 31.
Solution Comments
Show commentsProblem Recent Solvers31
Suggested Problems
-
3030 Solvers
-
599 Solvers
-
Replace multiples of 5 with NaN
449 Solvers
-
1391 Solvers
-
Flip the vector from right to left
9495 Solvers
More from this Author291
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!