Problems & Puzzles: Puzzles

Puzzle 1187  PrimePi[(Prime[n + 1]^2 + Prime[n]^2)/(Prime[n + 1] + Prime[n])]=n

Sebastián Martín Ruiz sent the following puzzle:

Regarding his formula:

PrimePi[(Prime[n + 1]^2 + Prime[n]^2)/(Prime[n + 1] + Prime[n])]=n, for n>=1

Where PrimePi is the prime counting function.

Q. Prove it of find a counterexample.


From Aug 31 to Sep 6, contributions came from Ivan Ianakev, Michael Branicky, Emmanuel Vantieghem, Alessandro Casini

***

Ivan wrote:

The proof is simple once we remember that, according to Bertrand's postulate, 

prime(n) + prime(n+1) < 3*prime(n).

Let us substitute (prime(n+1)^2 + prime(n)^2))/(prime(n+1) + prime(n))with x. 

Then pi(x) = pi(floor(x)) = pi(prime(n)) = n. 

***

Michael wrote:

Proof.
Let a = Prime[n + 1] and b = Prime[n].  Note a > b.
Then, we are trying to prove PrimePi[(a^2 + b^2)/(a + b)] = n.
Let x = (a^2 + b^2)/(a+b).
Now note x = ((a+b)^2 - 2*a*b)/(a+b) = a+b - 2*a*b/(a+b) = a+b - y, where y = 2*a*b/(a+b).
Since a > b: 2*a*b/(2*a) < y < 2*a*b/(2*b), or b < y < a.
So, a+b - a < x < a+b - b, or simply b < x < a.
Substituting back, we need to prove PrimePi[x] = n where Prime[n] < x < Prime[n+1].
This is true by the definition of PrimePi. # 

***

Emmanuel wrote:

We can prove the correctness of Sebastion's formula as a special case of the following well known theorem :
 
If  0 < p < q  are two real numbers, then for any couple  (a, b)  of strictly positive real numbers we have
            p < (a p + b q) / (a + b) < q

 
Taking  p = prime(n), q= prime(n+1), a = p, b = q..gives Sebastian's quotient, a rational number strictly between
p  and  q. 
 Thus, obviously there are exactly  n  primes smaller than that quotient, Q. E. D.

***

Alessandro wrote:

For any x, y distinct positive numbers, min(x, y) < (x^2 + y^2) / (x + y) < max(x, y). Then, the fraction inside Primepi is strictly between the nth prime and the next one. Therefore, Primepi(...) = n.

***

 

 

Records   |  Conjectures  |  Problems  |  Puzzles