2

I need to see how to make a certain development, and did not find any reference to do, the only quote I found, so is the following, I know (have shown)

$$ \pi(m)=-1+\sum_{j=1}^{m} F(j) $$ with $$F(j)=\left[ \cos^2 \pi\frac{(j-1)!+1}{j}\right]$$ and also I have to $$ \pi(m)=\sum_{j=1}^{m} H(j) $$ for all $ m\ge2 $, at where $$ H(j)=\dfrac{\sin^2\pi\dfrac{((j-1)!)^2}{j}}{\sin^2\dfrac{\pi}{j}} $$

this second part also fails to prove if someone wants to put some demonstration would be very happy, but the focus is the same demonstration that the nth prime number is given by

$$ p_n=1+\sum_{m=1}^{2^n} \left[\left(\frac{n}{\sum_{j=1}^{m} F(j)} \right )^{1/n} \right ]$$

benjamin_ee
  • 3,759
  • 2
    Can you ask a clearer question. "I need to see how to make a certain development..." is the closest to a question in the above, but it is unclear what you mean by it. – Thomas Andrews Oct 27 '15 at 13:31
  • @ Thomas Andrews Perhaps because of the language, but what I mean is I need a reference / book / article or a demonstration, as it does not find any.

    Excuse me.

    – benjamin_ee Oct 27 '15 at 13:34
  • @marcelolpjunior Is the question, Are the indicated formulas for $\pi(m)$ and $p_n$ correct? – Travis Willse Oct 27 '15 at 13:35
  • @Travis Yeah, I need the statement of formula for $p_n$ from $\pi(m)$ formulas shown before. – benjamin_ee Oct 27 '15 at 13:39
  • @DavidK In fact I really need is the statement of $p_n$ formula, so I guess it is no duplication of the question that you quoted. – benjamin_ee Oct 27 '15 at 13:40
  • 1
    Ah, well, you see this is why it is important to be clear what the question is. You say "I have to" with regard to $H(j)$, but you are less clear about the need to show the formula for $p_n$. – David K Oct 27 '15 at 13:44
  • The same formula for $p_n$ is formula (6) of http://mathworld.wolfram.com/PrimeFormulas.html -- but also see http://math.stackexchange.com/questions/1201359/who-discovered-the-first-explicit-formula-for-the-n-th-prime and http://math.stackexchange.com/questions/940338/the-myth-of-no-prime-formula – David K Oct 27 '15 at 13:55
  • You should make clear that the brackets are the floor function. This is better written as \left\lfloor ...\right\rfloor than with brackets. – Thomas Andrews Oct 27 '15 at 13:57

1 Answers1

4

The key fact in the formulae above is Wilson's theorem:

If $n$ is prime, then $(n-1)!+1$ is divisible by $n$.

And the slightly more obvious:

If $n$ is composite and $n\neq4,$ then $(n-1)!$ is divisible by $n$.

Let's state upfront, though: These formula are essentially "nonsense," in that they add zero knowledge beyond our knowledge from Wilson's theorem, and are certainly not computationally useful.

Formula 1

$$\theta_j = \pi\frac{(j-1)!+1}{j}$$

will be a multiple of $\pi$ if $j$ is prime, and something else if $j$ is not prime. So $\cos^2\theta_j = 1$ if $j$ is prime and otherwise it is some value in $[0,1)$ so

$$\left\lfloor \cos^2\theta_j \right\rfloor = \begin{cases}1&\text{if $j$ is prime or $j=1$}\\ 0&\text{if $j$ composite} \end{cases}$$

The case $j=1$ is why there is a $-1$ added to the sum above.

Formula 2

The second case has $H(j)=F(j)$ for $j>1$. It's not actually defined when $j=1$, so you'd have to deal with that to fix it.

If $j$ is composite, then $\pi\frac{(j-1)!^2}{j}$ is a multiple of $\pi$, so the numerator is zero, so $H(j)=0$.

When $j$ is prime, then $\pi\frac{(j-1)!^2}{j} = \frac{\pi}{j}+M\pi$ for some integer $M$, so the sine of this angle is $\pm\sin \frac{\pi}{j}$, and therefore the square of the quotient is $1$.

Formula 3

The last formula can be rewritten as:

$$p_n=1+\sum_{m=1}^{2^n} \left\lfloor\left(\frac{n}{1+\pi(m)} \right )^{1/n} \right\rfloor$$

But it is easy to show that $n^{1/n}<2$ for all $n$, and thus

$$\left\lfloor\left(\frac{n}{1+\pi(m)} \right )^{1/n}\right\rfloor=\begin{cases}1&\text{if }\pi(m)<n\\ 0&\text{otherwise} \end{cases}$$

Since the first $n$ primes are known to be less than $2^n$, this sum counts all $m$ with $\pi(m)<n$, which is is $p_n-1$. Adding $1$ gives $p_n$.

Thomas Andrews
  • 177,126