Write a function that outputs the
th prime after a given number n. For example, the
th prime after
is
.
NOTE: If n itself is prime start counting from the next prime greater than n.
Solution Stats
Problem Comments
3 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers21
Suggested Problems
-
Smallest distance between a point and a rectangle
281 Solvers
-
Project Euler: Problem 6, Natural numbers, squares and sums.
2600 Solvers
-
Create a Multiplication table matrix...
702 Solvers
-
Mysterious digits operation (easy)
332 Solvers
-
Pattern Recognition 3 - Variable Unit and Array Length (including cell arrays)
61 Solvers
More from this Author116
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Anything but an easy problem.
I guess that Matlab gives some people the wrong impression that everything is easy.
And Java, apparently. (tip)