This solution is outdated. To rescore this solution, sign in.
-
2 Comments
Li jw
on 19 Oct 2017
When x = 5 and x = 7, return false, is it right?
Matthew Eicholtz
on 19 Oct 2017
Yes, x = 5 and x = 7 are safe primes, but not "extra" safe primes because their corresponding values for p (2 and 3, respectively) are not safe primes.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!