Formula for primes

Willan's Formula is a formula that can find the "nth" prime number.
formula_1
Proof.
Let's first start with the formula_2.
Wilson's theorem says if formula_3 is divisible by formula_4, than formula_4 is either a prime number or formula_6, meaning when formula_4 is prime, formula_2 is an integer.
It would be much easier if the formula gives a number instead of checking if the number is an integer, and we can do this with the formula_9 part.
The reason the formula has formula_10 multiplied by the formula_2 part is because when formula_2 is an integer, formula_13 will give formula_6 or formula_15. 
When squaring the result then formula_13 will equal formula_6 when formula_2 is an integer.
By flooring this, the only results are formula_6 when formula_2 is an integer and formula_21 when it isn't, leavingformula_9.
The formula_23 will add formula_6s for the primes formula_6 - formula_26 and and will sum up to the formula_27.
The formula_28 in short will give formula_6 if formula_30 and formula_21 when formula_32.
Take the formula_33 of both sides where formula_33 is the "nth" prime number:
formula_6 when formula_36 formula_37 formula_38 formula_39
formula_21 when formula_36 formula_42 formula_43 formula_39
formula_45 gives the number formula_15, and the formula_15 is because when formula_48 formula_39 reaches formula_50 formula_39, the function doesn't add 1. The formula adds up to formula_52 is because Bertrand's postulate says formula_52 is bigger than the "nth" prime number.
And finally, formula_6 is added because of the formula_15.