What does this notation mean for calculating prime?

108 Views Asked by At

I'm not very proficient with math, but Ive managed to make my way to problem 7 of Project Euler using python. I have to now find the 10,001st prime number. I'm reading about Eucilid's theorem. But I'm afraid I do not understand enough about mathematical notation to understand the theorem.

What do the numbers in the p=p1,p2,p3 expression on this page (http://en.wikipedia.org/wiki/Euclid%27s_theorem#Euclid.27s_proof) mean? Is p the prime number? and the 1,2,3,4 are just counting the position?

Thanks in advance for your help.

2

There are 2 best solutions below

8
On BEST ANSWER

To turn this into the language of a programmer, $p$ is essentially an array of prime numbers. So $p_1$ is the first element of the array, $p_2$ is the second, and so on.

0
On

Yes indeed, that's the prime number position. Euler's proof of the infinitude of primes is a proof by contradiction, which assumes that the primes can be ordered into a finite set. Then, Euclid builds a number, which is the finite product of all primes. Then he adds 1 to that number, and he discovers that he has just built another prime.