# Is it possible to justify these approximations about prime numbers?

A recently closed question asked for a possible closed form of the infinite summation $$f(a)=\sum _{i=1}^{\infty } a^{-p_i}$$ for which I already proposed a first simple but totally empirical approximation.

Since we quickly face very small numbers, I tried to find approximations of

$$g(a)=\Big[\sum _{i=1}^{\infty } a^{-p_i}\Big]^{-1} \qquad \text{and} \qquad h(a)=\Big[\sum _{i=1}^{\infty } (-1)^{i-1} a^{-p_i}\Big]^{-1}$$

All calculations where done with integer values of $$a$$ for the range $$2 \leq a \leq 1000$$.

What I obtained is $$\color{blue}{g(a)\sim\frac{(a-1) (2a^3+2a-1)}{2 a^2}}\qquad \text{and} \qquad \color{blue}{h(a)\sim\frac{(a-1) \left(a^3+2 a^2+3 a+4\right)}{a^2}}$$

If the corresponding curve fits were done, in both cases we should have $$R^2 > 0.999999999$$.

For the investigated values of $$a$$, $$\text{Round}\left[\frac{(a-1) (2a^3+2a-1)}{2 a^2}-{g(a)}\right]=0$$ $$\text{Round}\left[\frac{(a-1) \left(a^3+2 a^2+3 a+4\right)}{a^2}-{h(a)}\right]=0$$

Not being very used to work with prime numbers, is there any way to justify, even partly, these approximations ?

• Clearly any approximation to $g(a)$ needs the factor $(a-1)$ because the sum blows up at $a=1$. I'd try truncating $(a-1)\sum a^{-p_i}$ to get some approximations and then combine them to hopefully get a better approximation. – user10354138 Jul 20 at 5:26
• @user10354138. The $(a-1)$ term was obvious and was included from the start because of what you said (for sure). – Claude Leibovici Jul 20 at 5:31

These estimates are correct within a reasonable degree of accuracy. Below is the explanation for $$f(a)$$; the case for $$h(a)$$ can be dealt similarly. We have

$$f(a) = \frac{1}{a^2} + \frac{1}{a^3} + \frac{1}{a^5} + O\bigg(\frac{1}{a^7}\bigg)$$

whereas

$$\frac{2a^2}{(a-1)(2a^3 + 2a - 1)} = \frac{1}{a^2} + \frac{1}{a^3} + \frac{1}{2a^5} + \frac{3}{2a^6} + O\bigg(\frac{1}{a^7}\bigg).$$

Hence,

$$f(a) = \frac{2a^2}{(a-1)(2a^3 + 2a - 1)} + O\bigg(\frac{1}{a^5}\bigg)$$

For large values of $$a$$ the error would obviously be negligible, since it grows no faster than a constant times $$a^{-5}$$. So this may or may not be a good estimate depending upon weather you are satisfied with the magnitude of the error term $$O(a^{-5})$$.

The best possible estimate of the form $$\dfrac{Ax^2}{(x-1)(Bx^3 + Cx^2 + Dx + E)}$$ is obtained by the Laurent series expansion of about the point $$x = \infty$$ and equating the coefficient of smallest non prime powers to zero which gives $$A = B = D = 1, C = 0,E = -1$$.

Hence we have,

$$f(a) = \frac{a^2}{(a-1)(a^3 + a - 1)} + O\bigg(\frac{1}{a^6}\bigg)$$

which reduces the error by a factor of $$a$$.

Update 21-Jul-2020: However, using basic properties of primes we can get remarkably sharper estimates. Since every primes $$\ge 5$$ are of the form $$6k \pm 1$$, by summing up the geometric sequences $$a^{-6k-1} + a^{-6k+1}$$ for $$k = 1,2,\ldots, \infty$$ and adding $$a^{-2} + a^{-3}$$, and taking advantage of the fact the the density of primes among the first few numbers of these form is high we get

$$f(a) = \frac{a^7 + a^6 + a^4 + a^2 -a - 1}{a^3(a^6 - 1)} + O\bigg(\frac{1}{a^{25}}\bigg)$$

• The estimate being a bit too large (by $a^{-5}$ plus smaller terms) also makes a lot of sense, since for smaller $a$ (i.e. those at the lower end of the range) the naive truncation as $a^{-2}+a^{-3}+a^{-5}$ will be a worse underestimate than it will at the high end of the range. – Steven Stadnicki Jul 20 at 17:51
• This is a fantastic answer with a nice reasoning and the update is just incredibly nice. Would you do the same for $\frac 1 {h(a)}$ ? I am curious. Thanks and cheers :-) – Claude Leibovici Jul 21 at 6:17
• If I may ask, how did you arrive to this result ? – Claude Leibovici Jul 22 at 13:19
• @ClaudeLeibovici Since every primes $\ge 5$ are of the form $6k \pm 1$, by summing up the geometric sequences $a^{-6k-1} + a^{-6k+1}$ for $k = 1,2,\ldots, \infty$ and adding $a^{-2} + a^{-3}$, and taking advantage of the fact the the density of primes among the first few numbers of these form is high, we the estimate with $O(a^{-25})$. This is because $25$ is the smallest number of this form which is not a prime. – Nilotpal Kanti Sinha Jul 22 at 15:17
• Thanks for the clear explanation. Cheers :-) – Claude Leibovici Jul 22 at 15:20

This a long comment. Here is a possible approach to estimate $$f(a)$$. Using Dusart's approximation (later improved by Axler), The $$n$$-th prime satisfies

$$n\log n + n\log\log n - n < p_n < n\log n + n\log\log n$$

where the lower bound holds for all $$n \ge 1$$ and the upper bound holds for $$n \ge 6$$. Hence for $$a > 1$$, we obtain an inequality of the form

$$\frac{1}{a^2} + \frac{1}{a^3} + \frac{1}{a^5} + \sum_{n = 6}^{\infty}\frac{1}{a^{n\log n + n\log\log n }} < \sum_{n = 1}^{\infty} \frac{1}{a^{p_n}} < \sum_{n = 1}^{\infty}\frac{1}{a^{n\log n + n\log\log n - n }}$$

This can gives some tight approximations if we can convert left and the right sums to a closed form approximation with controllable error terms, which however is the more tedious task.

• As you say, "if we can convert ..." ! Thanks & cheers :-) – Claude Leibovici Jul 20 at 7:20

I found this estimate for $$g$$: $$\ g(a)\sim \dfrac{a^2(a^2-1)}{a^2+a-1}$$.

## First inequality

$$f(a) = \displaystyle \sum_{i=1}^{+\infty} \dfrac{1}{a^{p_i}} \leqslant \sum_{i=2}^{+\infty} \dfrac{1}{a^i} -\sum_{i=2}^{+\infty} \dfrac{1}{a^{2i}} = \dfrac{1}{a^2}\dfrac{1}{1-\dfrac{1}{a}} -\dfrac{1}{a^4}\dfrac{1}{1-\dfrac{1}{a^2}}$$
$$f(a)\leqslant \dfrac{1}{a(a-1)}-\dfrac{1}{a^2(a^2-1)}= \dfrac{a^2+a-1}{a^2(a^2-1)}$$
$$\fbox{g(a)\geqslant \dfrac{a^2(a^2-1)}{a^2-a+1}}$$

## Second inequality

$$f(a) \geqslant \dfrac{1}{a^2}+\dfrac{1}{a^3}+\dfrac{1}{a^5}+\dfrac{1}{a^7}$$
$$\fbox{g(a)\leqslant \dfrac{a^7}{a^5+a^4+a^2+1}}$$

## Quality of the approximation

$$0\leqslant g(a)-\dfrac{a^2(a^2-1)}{a^2+a-1}\leqslant \dfrac{a^7}{a^5+a^4+a^2+1} - \dfrac{a^2(a^2-1)}{a^2+a-1}$$
And:
$$\dfrac{a^7}{a^5+a^4+a^2+1} - \dfrac{a^2(a^2-1)}{a^2+a-1} = \dfrac{a^2}{(a^5+a^4+a^2+1)(a^2+a-1)}$$
So
$$\fbox{0\leqslant g(a)-\dfrac{a^2(a^2-1)}{a^2+a-1}\leqslant \dfrac{1}{a^5}}$$
And:
$$\forall a \in [2,+\infty[ \ , \ \text{Round} \left( g(a)-\dfrac{a^2(a^2-1)}{a^2+a-1}\right) = 0$$

• Thank you very much ! Working the bounds is superb. Cheers :) – Claude Leibovici Jul 21 at 6:20