# I want an upper bound for a real function f(x,y,z) - prime counting

The function $f:\mathbb R^3\to\mathbb R$ is: $$\displaystyle f(x,y,z)=\frac{x}{yz}-\frac{\lfloor x/y\rfloor}{z} , \; \text{where}\,\; x,y,z>1.$$

If there is an upper bound less than 1, then it is possible to use integers especially in $(2)$ in the prime counting formula in Wikipedia (below) which I really want to code to examine how fast it is. I can't imagine that it will be efficient without big tables for $\pi$ used as terminal case in $(1)$.

Given $m$, select $y$ so that $\sqrt{m}\le y\le\sqrt{m}$ and let $n=\pi(y)$. Then

$(1)\;$ $\pi(m)=\phi(m,n)+n-1-P_2(m,n)$, where

$(2)\;$ $\displaystyle \phi(m,n)=\phi(m,n-1)-\phi\Big(\frac{m}{p_n},n-1\Big)$, $\;\phi(m,0)=\lfloor{m}\rfloor$ and

$(3)\;$ $\displaystyle P_2(m,n)=\sum_{y<p\le\sqrt{m}} \Big(\pi\Big(\frac{m}{p}\Big)-\pi(p)+1\Big)$, $\;p$ is a prime.

$P_2$ rather depend of $y$ than of $n$. But, given $n$ any $y$ such that $p_n\le y <p_{n+1}$ will due if :

$\sqrt{m}\le y\le\sqrt{m}$.

Supplement 1: Maybe I need to know an upper bound for

$$\displaystyle f(x,y,z)=\frac{x}{\lfloor yz\rfloor}-\frac{\lfloor x/y\rfloor}{z} , \; \text{where}\,\; x,y,z>1?$$

Supplement 2: No, not in $(2)$ because $y$ and $z$ are integers.

Supplement 3: see this question which is better set.

• Since $x/y-\lfloor x/y\rfloor<1, x/yz-\lfloor x/y\rfloor/z=(x/y-\lfloor x/y\rfloor)/z<1/z$. Is this a kind of a bound you want? – Wojowu Dec 22 '15 at 7:17
• @Wojowu: Thank you! If you post it I'll accept it. – Lehs Dec 22 '15 at 7:22

Since we have $$\frac{x}{y}-\lfloor\frac{x}{y}\rfloor<1$$
we can write $$\frac{x}{yz}-\frac{\lfloor\frac{x}{y}\rfloor}{z}=\frac{1}{z}(\frac{x}{y}-\lfloor\frac{x}{y}\rfloor)<\frac{1}{z}$$
which is a tighter bound than $1$ since $\frac{1}{z}<1$.