Evaluate/asymptotic of the sum $\sum_{a = 1}^{L \left({N}\right)} \left({- 1}\right)^{\left\lfloor{N/\left({2\, a + 1}\right)}\right\rfloor}$

asymptoticsnumber theorysummation

I am trying to evaluate the sum and its asymptotic limit as $N \rightarrow \infty$ of

$$\sum_{a = 1}^{L \left({N}\right)} \left({- 1}\right)^{\left\lfloor{N/\left({2\, a + 1}\right)}\right\rfloor}$$

where the upper limit can be either $L \left({N}\right) = {L}_{1} \left({N}\right) = \left\lfloor{\frac{N}{6} – \frac{1}{2}}\right\rfloor$ or $L \left({N}\right) = {L}_{2} \left({N}\right) = \left\lfloor{\frac{1}{2} \left\lceil{\sqrt{N + 2}}\right\rceil}\right\rfloor-1$.

It looks like I should count the number of even and odd terms of $$\left({- 1}\right)^{\left\lfloor{N/\left({2\, a + 1}\right)}\right\rfloor}$$

The case for ${L}_{2} \left({N}\right)$ when $N \rightarrow \infty$ looks to be $\sim \sqrt[4]{N}$. The similar case for ${L}_{1} \left({N}\right) \sim \alpha\, N$ for some constant $\alpha$.

My literature search has not revealed any number theory equivalents nor anything for the asymptotic limits. I suspect that the sum equivalent of the sum of the number of divisors or $\sum_{n = 1}^{x} \left\lfloor{\frac{N}{n}}\right\rfloor$ has been broken down into the even and odd floor function results, but again I am not finding any literature on this subject.

These sums arise from computing the exact number of factorable quartics of the form $\left({x+a}\right)^{2} \left({x+b}\right) \left({x+c}\right)$ where $a, b, c$ are integer roots.

Best Answer

I get $ \frac{N}{2}(1-2\ln(2))+O(L(N)) $.

So we want $m \le N/(2a+1) \lt m+1 $ or $m/N \le 1/(2a+1) \lt (m+1)/N $ or $N/m \ge 2a+1 > N/(m+1) $ or $(\frac{N}{m}-1)/2 \ge a \gt (\frac{N}{m+1}-1)/2 $ or $\frac{N-m}{2m} \ge a \gt \frac{N-m-1}{2(m+1)} $.

The number of these is about

$\begin{array}\\ \frac{N-m}{2m} -\frac{N-m-1}{2(m+1)} &=\frac{(N-m)(m+1)-(N-m-1)(m)}{2m(m+1)}\\ &=\frac{(N-m)m+(N-m)-(N-m)m+m}{2m(m+1)}\\ &=\frac{N}{2m(m+1)}\\ \end{array} $

so the sum is about

$\begin{array}\\ s(N) &=\sum_{a = 1}^{L \left({N}\right)} \left({- 1}\right)^{\left\lfloor{N/\left({2\, a + 1}\right)}\right\rfloor} \\ &\approx \sum_{m=1}^{N/(2L(N))} \frac{N}{2m(m+1)}(-1)^m\\ &= \frac{N}{2}\sum_{m=1}^{f(N)} \frac{(-1)^m}{m(m+1)} \qquad f(N)=N/(2L(N))\\ &= \frac{N}{2}\sum_{m=1}^{f(N)} (-1)^m(\frac1{m}-\frac1{m+1})\\ &= \frac{N}{2}\left(\sum_{m=1}^{f(N)} \frac{(-1)^m}{m}-\sum_{m=1}^{f(N)} \frac{(-1)^m}{m+1}\right) \\ &= \frac{N}{2}\left(\sum_{m=1}^{f(N)} \frac{(-1)^m}{m}-\sum_{m=2}^{f(N)+1} \frac{(-1)^{m-1}}{m}\right)\\ &= \frac{N}{2}\left(\sum_{m=1}^{f(N)} \frac{(-1)^m}{m}+\sum_{m=2}^{f(N)+1} \frac{(-1)^{m}}{m}\right)\\ &= \frac{N}{2}\left((-1)+\sum_{m=2}^{f(N)} \frac{(-1)^m}{m}+\sum_{m=2}^{f(N)} \frac{(-1)^{m}}{m}+\frac{(-1)^{f(N)+1}}{f(N)+1}\right)\\ &= \frac{N}{2}\left((-1)+2\sum_{m=2}^{f(N)} \frac{(-1)^m}{m}+\frac{(-1)^{f(N)+1}}{f(N)+1}\right)\\ &\approx \frac{N}{2}\left((-1)+2(1-\ln(2))+\frac{(-1)^{f(N)+1}}{f(N)+1}\right)\\ &\approx \frac{N}{2}(1-2\ln(2))+\frac{(-1)^{f(N)+1}N}{2(f(N)+1)}\\ &\approx \frac{N}{2}(1-2\ln(2))+\frac{(-1)^{f(N)+1}N}{2N/(2L(N))}\\ &= \frac{N}{2}(1-2\ln(2))+(-1)^{f(N)+1}L(N)\\ &= \frac{N}{2}(1-2\ln(2))+O(L(N))\\ \end{array} $

Related Question