Problem 241. Project Euler: Problem 7, Nth prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.
What is the Nth prime number?
Solution Stats
Problem Comments
-
6 Comments
Show
3 older comments
Sachin Mysore
on 15 Mar 2022
There's a really easy way to cheese this problem if you find it. It happens to lie in the comment John D'Errico made about there being too few test cases. I'd encourage you to do the problem properly without such a cheese
Aadhithya T V
on 14 Jan 2023
A good problem!
Brandon
on 22 May 2023
I'm really wondering about this cheese, as the problem is stupidly simple already. Even a proper solution is size 16. 25 if you really want to push huge numbers and use a proper upper bound on the nth prime.
Solution Comments
Show commentsProblem Recent Solvers1562
Suggested Problems
-
4112 Solvers
-
22323 Solvers
-
4351 Solvers
-
Find the alphabetic word product
3370 Solvers
-
Calculate the area of a triangle between three points
3132 Solvers
More from this Author51
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!