# What is the Sum of the Amount of Powers of Primes $p$ between $n-2p$ and $n$?

What is the sum of the amount powers of primes $p$ between $n-2p$ and $n$, with $n>p$, and$2 < p < \frac{n}{2}$?

By powers of primes, I mean an integer of the form $p^k$, not an integer of the form $p^a q^b \cdots$. So far, I have tried this, by letting $\psi$ represent the quantity above:

$$\psi = \sum_{q} (\log_q(n)-\log_q(n-2q)) = \sum_{q} \frac{ \ln( \frac{n}{n-2q})}{\ln(q)},$$ where $q$ ranges across the odd primes less than or equal to $\frac{n}{2}$. I'm not sure how to simplify further, or whether the sum above ever gets very large. In case my sum is correct and you see some sort of simplification, please also discuss behavior of $\psi$ as $n \rightarrow \infty$.

• its too much to let $p< n$ since then $n-2p <0$ , its enough to let $p < \frac{n}{2}$. – Ahmad Sep 27 '17 at 22:11
• to understand your question , let for example $p=3,n=9$ so we are looking for $6,7,8,9$ and $6=2*3$ and $7=7$ and $8=2^3$ and $9=3^2$ so $\psi = 8$. – Ahmad Sep 27 '17 at 22:16
• @Ahmad Actually, 6 does not count since it is a composite made of the product of two primes, and 8 also does not count because I excluded 2 above. Other than this, it's correct. – Linus Rastegar Sep 27 '17 at 22:23
• @Ahmad Also, thanks for the suggestion with $\frac{n}{2}$. I've made the appropriate edits. – Linus Rastegar Sep 27 '17 at 22:24
• the example i gave we should start from $3$ since $n-2p=3$ and not $6$ , right ? – Ahmad Sep 27 '17 at 22:46

the number of primes power less or equal to $n$.

you have $\sum \limits_{ q \leq n} \frac{1}{2}\lfloor \ln_q (n) \rfloor (\lfloor \ln_q (n) \rfloor +1) = \sum \limits_{t=1}^{\ln_2(q)} \sum \limits_{n^{\frac{1}{t+1} }< q \leq n^{\frac{1}{t}}} \frac{1}{2}t(t+1) = \sum \limits_{t=1}^{\ln_2(n) } \frac{1}{2} t (t+1)( 1+\pi(n^{\frac{1}{t}})-\pi(n^{\frac{1}{t+1}})) = 1+\pi(n)-\pi(\sqrt{n})+3 \pi(\sqrt{n}) -3 \pi(\sqrt[3]{n}) + \cdots = 1+\sum \limits_{j=1}^{\ln_2(n)} j \pi(n^{\frac{1}{j}})$

$1+\pi(n)+2\pi(\sqrt{n}) < 1+\sum \limits_{j=1}^{\ln_2(n)} j \pi(n^{\frac{1}{j}}) < 1+\pi(n)+\frac{\log (n) \log (2 n)}{2 \log ^2(2)} \pi(\sqrt{n})$

So $1+\sum \limits_{j=1}^{\ln_2(n)} j \pi(n^{\frac{1}{j}}) \approx \frac{n}{\ln n}$.

I am too lazy to complete the answer but you need to subtract the same approach as above but now for $n-2p$.

Hope it helped.

• ?? $\sum_{y \le p^k \le x} 1 =\text{Li}(x)-\text{Li}(y)+o(\frac{x}{\log^k x})$ that's all we can say in general – reuns Sep 27 '17 at 23:45
• @reuns and this is what i said since $\pi(\sqrt{n})$ don't effect $\pi(n)$ too much or the smaller powers, thanks any way. – Ahmad Sep 27 '17 at 23:48
• Wouldn't a more simple approximation to the statement at the top of your partial answer be $\sum_{q} \log_{q} n$ for all $q$ odd prime less than $n$, and then with a change of base? – Linus Rastegar Sep 28 '17 at 12:27
• sure, i just want to show you the exact answer formula, but since unconditionally the function $\pi(n)$ is bounded by $Li(n)$ and $O(n^{1-\epsilon})$ so all the other terms fade away, any approximation using $Li(n)$ is fine or even using $\frac{n}{\ln n}$. – Ahmad Sep 28 '17 at 12:39