A prime counting function I have never seen

Intermediate result:

Let [math] P(x)=\prod_{k=1}^{[x]}\left(1+\dfrac{2}{k}\right)^{k/2} [/math]and [imath] L(x)=\log P(x). [/imath] Then (deduction follows when I finish my work or get stuck)
[math] L(x)=\dfrac{\log(3)}{2}+\log(2)+[x]-\dfrac{1}{2}-H_{[x]}+\sum_{n=3}^\infty (-1)^{n+1}\dfrac{2^{n-1}}{n}\left(\zeta(n-1,3)-\zeta(n-1,[x]+1)\right) [/math]I needed [imath] n-1>1 [/imath] to use the Hurwitz zeta-function, i.e. [imath] n\ge 3. [/imath]

This isn't likely the "simplification" you spoke about, and it will get worse when I replace the Hurwitz zeta-function by its integral expression and the harmonic number by [imath] H_{[x]}=\log [x] +\gamma +\mathcal{O}(1/[x]) [/imath] with the Euler-macaroni, sorry, Euler-Mascharoni constant [imath] \gamma [/imath] or by an integral, too.
Damn it. My video is going to only be like 2 mins long if you keep debunking my stuff lol. It’s all good though. I will also show my mistakes. My videos are more about the journey. Not the destination. Just trying to find like minded people who want to have fun with math and try new things.
 
Here is what I have done. I'm not sure whether this pleases you. It's a little bit complicated.

1) I defined the function
[math] \displaystyle{P(x)=\prod_{k=1}^{[x]}\left(1+\dfrac{1}{k/2}\right)^{k/2}} \;.[/math]
2) Your claim is thus about [imath] P(14) [/imath] and it says [imath] P(14)\sim\pi\left(e^{15}\right)-\pi\left(e^{14}\right) [/imath] where [imath] \pi [/imath] is the prime counting function, i.e. in other words [math] P(14)\sim 141738. [/math]
3) You wrote, and I corrected two typos and added the more accurate approximation with the constant [imath] 1.08366 [/imath] in the denominator:
The amount of primes between [imath]e^{14}[/imath] and [imath]e^{15}[/imath] is [imath]141738.[/imath] Using [imath]x/\log(x)[/imath] we get [imath]132034.[/imath] [imath]P(14)=135839.07337861.[/imath] Using [imath]x/(\log x -1.08366)[/imath] we get [imath]141798.[/imath] For further steps, we will use the logarithm of [imath]P(x)[/imath] because sums are easier to handle.

4) Comment: the approximation with [imath] 1.08366 [/imath] is hard to beat. It has only an error of [imath] 60 [/imath] or [imath] 0.04 \% [/imath]

5) Anyway. Here is what I have done with [imath] L(x)=\log P(x). [/imath]

[math]\begin{array}{lll} L(x)&=\log(P(x))=\displaystyle{ \sum_{k=1}^{[x]}\frac{k}{2}\log\left(1+\dfrac{2}{k}\right) }\\[18pt] &=\displaystyle{ \dfrac{\log(3)}{2}+\log(2)+\sum_{k=3}^{[x]}\frac{k}{2}\log\left(1+\dfrac{2}{k}\right) } \\[18pt] &=\displaystyle{ \dfrac{\log(3)}{2} +\log(2)+\sum_{k=3}^{[x]}\frac{k}{2}\sum_{n=1}^\infty (-1)^{n+1}\dfrac{2^n}{nk^n} } \\[18pt] &=\displaystyle{ \dfrac{\log(3)}{2}+\log(2)+ \sum_{k=3}^{[x]}\left(1+\sum_{n=2}^\infty(-1)^{n+1}\dfrac{2^{n-1}}{nk^{n-1}}\right) } \\[18pt] &=\displaystyle{ \dfrac{\log(3)}{2}+\log(2)+([x]-2)+\sum_{k=3}^{[x]}\left(-\dfrac{1}{k}+\sum_{n=3}^\infty(-1)^{n+1}\dfrac{2^{n-1}}{nk^{n-1}}\right) } \\[18pt] &=\displaystyle{ \dfrac{\log(3)}{2}+\log(2)+([x]-2)-\sum_{k=3}^{[x]}\dfrac{1}{k}+\sum_{k=3}^{[x]}\sum_{n=3}^\infty(-1)^{n+1}\dfrac{2^{n-1}}{nk^{n-1}} } \\[18pt] &=\displaystyle{ \dfrac{\log(3)}{2}+\log(2)+[x]-\dfrac{1}{2}- \sum_{k=1}^{[x]}\dfrac{1}{k}+\sum_{n=3}^\infty (-1)^{n-1}\dfrac{2^{n-1}}{n}\sum_{k=3}^{[x]}\dfrac{1}{k^{n-1}} } \end{array}[/math]
We have for the harmonic series the formulas

[math]\begin{array}{lll} \displaystyle{ \sum_{k=1}^{[x]}\dfrac{1}{k} } &=H_{[x]}= \displaystyle{ \int_0^1\dfrac{1-t^{[x]}}{1-t}\,dt } \\[18pt] &=\log [x] +\gamma + \dfrac{1}{2[x]}+\ldots \\[18pt] &\ldots -\dfrac{1}{12[x]^2}+\dfrac{1}{120[x]^4}-\dfrac{1}{252[x]^6}+\dfrac{1}{240[x]^8}-\dfrac{1}{132[x]^{10}}+\mathcal{O}\left(\dfrac{1}{[x]^{12}} \right) \end{array}[/math]
and for the Hurwitz zeta-function

[math] \zeta(s,q)=\sum_{k=0}^\infty \dfrac{1}{(q+k)^{s}}=\dfrac{1}{\Gamma(s)}\int_0^\infty \dfrac{t^{s-1}e^{-qt}}{1-e^{-t}}\,dt\, , \,q>0\, , \,s>1 [/math]
the formulas

[math]\begin{array}{lll} \displaystyle{ \sum_{k=3}^{[x]}\dfrac{1}{k^{n-1}} } &=\displaystyle{ \sum_{k=0}^{[x]-3}\dfrac{1}{(3+k)^{n-1}}=\sum_{k=0}^{\infty }\dfrac{1}{(3+k)^{n-1}}-\sum_{k={[x]-2}}^{\infty }\dfrac{1}{(3+k)^{n-1}} } \\[18pt] &=\displaystyle{ \zeta(n-1,3)-\sum_{m=0}^\infty \dfrac{1}{([x]+1+m)^{n-1}}=\zeta(n-1,3)-\zeta(n-1,[x]+1) } \\[18pt] &=\displaystyle{ \dfrac{1}{(n-2)!}\int_0^\infty \dfrac{t^{n-2}\left(e^{-3t}-e^{-([x]+1)t}\right)}{1-e^{-t}} } \,dt \end{array}[/math]
That makes in total

[math]\begin{array}{lll} L(x)&=\displaystyle{ \dfrac{\log(3)}{2}+\log(2)+[x]-\dfrac{1}{2}-\int_0^1\dfrac{1-t^{[x]}}{1-t}\,dt +\ldots } \\[18pt] &\displaystyle{ \ldots+\int_0^\infty \dfrac{e^{-3t}-e^{-([x]+1)t}}{1-e^{-t}}\left(\sum_{n=3}^\infty (-1)^{n-1}\dfrac{2^{n-1}}{n(n-2)!} t^{n-2}\right) \,dt } \end{array}[/math]
Now (using WA) we get

[math] \displaystyle{ \sum_{n=3}^\infty (-1)^{n-1}\dfrac{2^{n-1}}{n(n-2)!} t^{n-2}= \dfrac{ 2t^2 - 1 + 2te^{-2 t} + e^{-2 t}}{2 t^2} } [/math]
and thus

[math]\begin{array}{lll} I_{[x]}(t)&= \displaystyle{ \dfrac{e^{-3t}-e^{-([x]+1)t}}{1-e^{-t}}\left(\sum_{n=3}^\infty (-1)^{n-1}\dfrac{2^{n-1}}{n(n-2)!} t^{n-2}\right) \,dt } \\[18pt] &=\displaystyle{ \dfrac{e^{-3t}-e^{-([x]+1)t}}{1-e^{-t}}\ \cdot\ \dfrac{ 2t^2 - 1 + 2te^{-2 t} + e^{-2 t}}{2 t^2} } \end{array}[/math]
and finally

[math]\begin{array}{lll} L(x)&=\displaystyle{ \log\left(\dfrac{2\sqrt{3}}{\sqrt{e}}\right)+[x]-H_{[x]}+\int_0^\infty I_{[x]}(t)\,dt\;. } \end{array}[/math]
Let us test our result with [imath] x=14. [/imath]

[math]\begin{array}{lll} L(14)&=\log P(14)=\log (135839.07337861) \approx 11.81922618\\[18pt] H(14)&=\dfrac{1171733}{360360}\\[18pt] \displaystyle{ \int_0^\infty I_{14}(t)\, dt } &\approx 0.328335\\[18pt] L(14)&\approx 13.5+\log(2\sqrt{3})-\dfrac{1171733}{360360}+0.328335 \approx 11.819226 \end{array}[/math]
There is a small error caused by the approximation of the integral by WA.

6) At least you have a nice formula and you could test values for [imath] x [/imath] other than [imath] 14. [/imath] I think they get better with increasing [imath] x [/imath] but not as good as Legendre's approximation.

7) So much to: "within minutes". Nice constant by the way.

Here is the WA link for the integral:
That should save you a lot of typing. You only have to replace the [imath] 14 [/imath] by another number for [imath] x. [/imath]
 
Last edited:
I have checked the numbers for [imath] P(20) [/imath] and the number of primes between [imath] e^{21} [/imath] and [imath] e^{20} [/imath] and compared them with the numbers for [imath] P(14) [/imath] and the number of primes between [imath] e^{15} [/imath] and [imath] e^{14} [/imath] and both with Legendre's approximation. I have found:

[math]\begin{array}{lll} \Delta_{abs}(14)&=\pi\left(e^{15}\right)-\pi\left(e^{14}\right)-[P(14)]=5899\\[12pt] \Delta_{rel}(14)&=\dfrac{\Delta_{abs}(14)}{\pi\left(e^{15}\right)-\pi\left(e^{14}\right)}\approx 4,162\,\%\\[36pt] \Delta^L_{abs}(14)&=\pi\left(e^{15}\right)-\pi\left(e^{14}\right)-\left[\dfrac{e^{15}}{15-1,08366}\right]+\left[\dfrac{e^{14}}{14-1,08366}\right]\\[12pt] &= 141738-234905+93107=-60\\[12pt] \Delta^L_{rel}(14)&=\dfrac{\Delta^L_{abs}(14)}{\pi\left(e^{15}\right)-\pi\left(e^{14}\right)}\approx -0,0423\, \% \\[36pt] \Delta_{abs}(20)&=\pi\left(e^{21}\right)-\pi\left(e^{20}\right)-[P(20)]=774.075\\[12pt] \Delta_{rel}(20)&=\dfrac{\Delta_{abs}(20)}{\pi\left(e^{21}\right)-\pi\left(e^{20}\right)}\approx 1,911\,\%\\[36pt] \Delta^L_{abs}(20)&=\pi\left(e^{21}\right)-\pi\left(e^{20}\right)-\left[\dfrac{e^{21}}{21-1,08366}\right]+\left[\dfrac{e^{20}}{20-1,08366}\right]\\[12pt] &= 40510215 - 66217776 + 25647942 = -59619\\[12pt] \Delta^L_{rel}(20)&=\dfrac{\Delta^L_{abs}(20)}{\pi\left(e^{21}\right)-\pi\left(e^{20}\right)}\approx -0,147\,\% \end{array}[/math]
This does not prove my claim, but gives evidence that your formula gets better with higher numbers, and that Legendre is unbeatable.

P.S.: The game you're playing is contagious. 8-)
 
I have checked the numbers for [imath] P(20) [/imath] and the number of primes between [imath] e^{21} [/imath] and [imath] e^{20} [/imath] and compared them with the numbers for [imath] P(14) [/imath] and the number of primes between [imath] e^{15} [/imath] and [imath] e^{14} [/imath] and both with Legendre's approximation. I have found:

[math]\begin{array}{lll} \Delta_{abs}(14)&=\pi\left(e^{15}\right)-\pi\left(e^{14}\right)-[P(14)]=5899\\[12pt] \Delta_{rel}(14)&=\dfrac{\Delta_{abs}(14)}{\pi\left(e^{15}\right)-\pi\left(e^{14}\right)}\approx 4,162\,\%\\[36pt] \Delta^L_{abs}(14)&=\pi\left(e^{15}\right)-\pi\left(e^{14}\right)-\left[\dfrac{e^{15}}{15-1,08366}\right]+\left[\dfrac{e^{14}}{14-1,08366}\right]\\[12pt] &= 141738-234905+93107=-60\\[12pt] \Delta^L_{rel}(14)&=\dfrac{\Delta^L_{abs}(14)}{\pi\left(e^{15}\right)-\pi\left(e^{14}\right)}\approx -0,0423\, \% \\[36pt] \Delta_{abs}(20)&=\pi\left(e^{21}\right)-\pi\left(e^{20}\right)-[P(20)]=774.075\\[12pt] \Delta_{rel}(20)&=\dfrac{\Delta_{abs}(20)}{\pi\left(e^{21}\right)-\pi\left(e^{20}\right)}\approx 1,911\,\%\\[36pt] \Delta^L_{abs}(20)&=\pi\left(e^{21}\right)-\pi\left(e^{20}\right)-\left[\dfrac{e^{21}}{21-1,08366}\right]+\left[\dfrac{e^{20}}{20-1,08366}\right]\\[12pt] &= 40510215 - 66217776 + 25647942 = -59619\\[12pt] \Delta^L_{rel}(20)&=\dfrac{\Delta^L_{abs}(20)}{\pi\left(e^{21}\right)-\pi\left(e^{20}\right)}\approx -0,147\,\% \end{array}[/math]
This does not prove my claim, but gives evidence that your formula gets better with higher numbers, and that Legendre is unbeatable.

P.S.: The game you're playing is contagious. 8-)
lol oh no I have created a monster. I really do love this game. Been playing it for probably 20 years. The very first time I heard that the distribution of primes was random I was hooked. The very first thing I did was find some graph paper and started to write the integers in a spiral and circle the primes. Freaked out when I noticed the long lines. Then when I found out that this was only discovered in the 1960s I realized this is a game that anybody can play. If I could find something that was only discovered 60 years ago, which is like yesterday in the math world, anyone could.

Did you watch my first video on using the golden ratio for primes? I found how you can also sum primes to get prime density. And that was only discovered a few years ago. It’s very addictive. :)
 
I really do love this game. Been playing it for probably 20 years. The very first time I heard that the distribution of primes was random I was hooked.
That makes mathematics different from other sciences. You can basically "define" things and prove theorems about it. Whether they serve a purpose is another question. I also have a hobbyhorse. I made a simple observation (provable) that nobody else seems to be interested in. The problem: I have a lot of examples but I cannot find a tool that reliably delivers results. Only a whole bunch of even more examples.
 
Top