On simple calculations with $\sum_{k=1}^{n-1}\left\lfloor{\frac{km}{n}}\right\rfloor=\frac{1}{2}(m-1)(n-1)$ and primes $m$ and $n$

91 Views Asked by At

Wikipedia's article for Floor and ceiling functions, relates in the section of Quotients that the identity $$\sum_{k=1}^{n-1} \left\lfloor{\frac{km}{n}}\right\rfloor=\frac{1}{2}(m-1)(n-1)$$ holds whenever $m$ and $n$ are positive and coprime.

Let $p_r$ the rth prime number, I wrote for $p_1=2$ and $p_2=3$ that $$\sum_{k=1}^{p_2-1}\left\lfloor{\frac{kp_1}{p_2}}\right\rfloor=\frac{1}{2}(p_1-1)(p_2-1),$$ and when $N=2m$, where $m\leq 1$ is an integers, one writes also $$\sum_{k=1}^{p_{N+1}-1}\left\lfloor{\frac{kp_N}{p_{N+1}}}\right\rfloor=\frac{1}{2}(p_{N}-1)(p_{N+1}-1).$$ Then telescoping the product of consecutive quotients of all identities which one states between these extremes one proves $$(P_{N+1}-1)\left(\prod_{j=1}^{\frac{N}{2}}\sum_{k=1}^{p_{2j-1}}\left\lfloor{\frac{kp_{2j-1}}{p_{2j}}}\right\rfloor\right)=\prod_{j=1}^{\frac{N}{2}}\sum_{k=1}^{p_{2j+1}}\left\lfloor{\frac{kp_{2j}}{p_{2j+1}}}\right\rfloor.$$ And as consequence of the Prime Number Theorem then one has the asymptotic equivalence $$((N+1)\log (N+1))\left(\prod_{j=1}^{\frac{N}{2}}\sum_{k=1}^{p_{2j-1}}\left\lfloor{\frac{kp_{2j-1}}{p_{2j}}}\right\rfloor\right)\sim\prod_{j=1}^{\frac{N}{2}}\sum_{k=1}^{p_{2j+1}}\left\lfloor{\frac{kp_{2j}}{p_{2j+1}}}\right\rfloor,$$ as $N$ tends to infinite.

Question. a) Please can you say me if were right my calculations? Only is required a yes/no, since b) can you state the similar identity and the corresponding asymptotic equivalence for the case $N=2m+1$? Many thanks.