Problem 7 - 10001st Prime
Problem 7
This problem asks for 10001st number prime. As far as I know, there is no trick to get there. We need compute all the numbers in the series. As I’ve written before, solving Euler project problems using a DB has some advantages. We already have some prime numbers stored from problem 2. In order to get the 10001st item, we just use sql offset
command.
1
select number from primes limit 1 offset 10000
This post is licensed under CC BY 4.0 by the author.