0

Proof that this formula always generates primes.Also it generates all primes(grate prime numbers formula)

enter image description here

I have tried this formula it also generates primes orderd except the prime 2.

I am really interested in this formula because it generates all primes there are such formulas for example this one$\left\lfloor\text{A}^{3^n}\right\rfloor$.But it don't generates all primes and $A$ is a dangerous number and that becomes calculating hard.Also there are some formula that sometimes don't generates primes but they are easy to use.By the way if anyone can proof this formula more people can interest.I also don't belive that it's real but I tried it to 50 numbers and it worked.

Taha Akbari
  • 3,559

1 Answers1

5

Wilson's theorem states that $(p-1)!+1\equiv 0\mod{p}$ if and only if $p$ is prime. Thus $2m+1\mid (2m)!+1$ if and only if $(2m)!+1\equiv 0\mod{2m+1}$ if and only if $2m+1$ is prime. Therefore $\frac{(2m)!+1}{2m+1}$ is an integer if and only if $2m+1$ is prime.

So if $2m+1=p$ is prime, the formula reduces to $$H(m) = 2\left(\frac{2m+1}{2}\right)^{\lfloor \frac{2m+1}{(2m)!+1}\cdot \frac{(2m)!+1}{2m+1}\rfloor} = 2\cdot \frac{2m+1}{2} = 2m+1,$$ which is prime.

If $2m+1$ is not prime, then since $\frac{(2m)!+1}{2m+1}$ is not an integer, its floor is less than $\frac{(2m)!+1}{2m+1}$, so the exponent is equal to zero and we get $H(m) = 2$.

rogerl
  • 22,399