Builidng Better Solutions For Web Development Recent WorkHow We Work
ProjectEuler.net
P1 | P2 | P3 | P4 | P5 | P6 | P7 | P8 | P9 | P10 | P22

Project Euler.net Answers

Problem 7

Solved on 2/29/2008

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 10001st prime number?

$p = 2;
$pw = 10001;
for($ic = 6; $p <= $pw; $ic+=6){
if($this->isPrime($ic-1)){
$p++;
if ($p == $pw) $answer = $ic-1;
}
if($this->isPrime($ic+1)){
$p++;
if ($p == $pw) $answer = $ic+1;
}
}
answer = 104,743

Latest News
Feb. 11, 2008
Wells Ideas Inc. launches their redesigned site.

The site is built on a symfony platform and utilizes client information from their project management site.
Quote Of The Day
"The greatest challenge to any thinker is stating the problem in a way that will allow a solution."
- Bertrand Russell