What is the periodic function that $\frac{\ln\left( \sum_{n=0}^{\lfloor x \rfloor} n! \right) - x \ln(x) + x }{\ln(x)}$ converges to?

78 Views Asked by At

I was analyzing the function

$$\frac{\ln \left( \sum_{n=0}^{\lfloor x \rfloor} n! \right) - x \ln(x) + x}{\ln(x)} $$

I had a hunch that this object tends to a periodic function as $x \rightarrow \infty$ (which generalizes some ideas to an answer of mine here) but I'm having difficulty determining what that actual function should be.

If one just goes ahead and graphs this on Desmos:

enter image description here

Then its easy to see that this very closely resembles something of the form $c - \lbrace x\rbrace$ where $\lbrace x \rbrace$ is the fractional part function and $c$ is some unknown constant.

Now Unfortunately Desmos fails to graph this beyond $x = 170$ most likely due to arithmetic limits and even with Wolfram Mathematica evaluated around $x=3000$ this graph still seems to have some small offset $C > \frac{1}{2}$. In my experience constants like this usually are nice numbers like $\frac{1}{2}$ so this might be because I need to go to something much larger like $x=10^{100}$ to notice it. But its just as plausible that it might genuinely be some weird magic constant thats close to but not exactly $\frac{1}{2}$.

enter image description here

So at this point I believe the periodic limiting function (lets call it $P(x)$ looks like

$$ P(x) = C - \lbrace x\rbrace + a_2 \lbrace x\rbrace ^2 + a_3 \lbrace x\rbrace ^3 ... $$

Where the higher order $a_2, a_3.... $ if they exist must be truly miniscule.

Is it possible to calculate what that $C$ and higher order terms will be in a closed form, or even numerically, but if numerically then in a way thats 100% certain about the digits it has extracted? My strategy of just scrolling to the right and reading the digits is definitely very poor way to do this.

Attempts to Derive:

In similar problems I often try to use the Euler Maclaurin formula so we can attempt to do that here

$$ \sum_{n=0}^{\lfloor x \rfloor} n! = \int_{0}^{\lfloor x \rfloor} n! dn + \frac{\lfloor x \rfloor ! - 0!}{2} + \frac{1}{12} \left( \frac{d}{dn} \left[ n! \right] \right)|_{0}^{\lfloor x \rfloor} + ... $$

Now considering that from Stirlings formula we have that $n! \sim e^{n \ln(n) - n + 1/2 \ln(2\pi n) }$ it's clear that the integral term will be of lower order compared to the derivative terms. But quickly this formula turns into a mess when you make such simplifications and that doesn't seem to get me closer to understanding the desired asymptotics.

1

There are 1 best solutions below

1
On BEST ANSWER

Note that $$ \sum\limits_{n = 0}^{\left\lfloor x \right\rfloor } {n!} = \left\lfloor x \right\rfloor !\left( {1 + \mathcal{O}\!\left( {\frac{1}{x}} \right)} \right) $$ as $x\to+\infty$. Hence, by Stirling's formula, \begin{align*} \ln \left( {\sum\limits_{n = 0}^{\left\lfloor x \right\rfloor } {n!} } \right)& = \ln (\left\lfloor x \right\rfloor !) + \mathcal{O}\!\left( {\frac{1}{x}} \right) = \left( {\left\lfloor x \right\rfloor + \frac{1}{2}} \right)\ln \left\lfloor x \right\rfloor - \left\lfloor x \right\rfloor + \ln \sqrt {2\pi } + \mathcal{O}\!\left( {\frac{1}{x}} \right) \\ & = \left(\frac{1}{2}- \left\{ x \right\}\right)\ln x + x\ln x - x + \ln \sqrt {2\pi } + \mathcal{O}\!\left( {\frac{1}{x}} \right) \end{align*} as $x\to+\infty$, with $\left\{ x \right\}=x-\lfloor x \rfloor$. Consequently, your function is $$ \frac{1}{2} - \left\{ x \right\}+ \frac{{\ln \sqrt {2\pi } }}{{\ln x}} + \mathcal{O}\!\left( {\frac{1}{{x\ln x}}} \right) $$ as $x\to+\infty$.