Any suggestions on a closed form of $\sum_{a=1}^{N} \left({\lfloor{\frac{N+1}{a}}\rfloor+\lfloor{\frac{N-1}{a}}\rfloor}\right)$

169 Views Asked by At

Now the sum is approximated by $$\sum_{a=1}^{N} \left({\left\lfloor{\frac{N+1}{a}}\right\rfloor + \left\lfloor{\frac{N-1}{a}}\right\rfloor}\right) \approx 2 \sum_{a=1}^{N} \left\lfloor{\frac{N}{a}}\right\rfloor$$.

when $N$ is large. This part of my on going research in polynomial factoring with constraints over the coefficients. I am looking for a possible closed form solution or if I can combine these two sum terms into one term.

2

There are 2 best solutions below

3
On BEST ANSWER

A first useful point to consider is that $$ \eqalign{ & \left\lfloor {{{N + 1} \over a}} \right\rfloor + \left\lfloor {{{N - 1} \over a}} \right\rfloor = \cr & = {{N + 1} \over a} + {{N - 1} \over a} - \left\{ {{{N + 1} \over a}} \right\} - \left\{ {{{N - 1} \over a}} \right\} = \cr & = {{2N} \over a} - \left( {\left\{ {{{N + 1} \over a}} \right\} + \left\{ {{{N - 1} \over a}} \right\}} \right) \cr} $$

And a second one is that $$ \eqalign{ & \left\{ x \right\} + \left\{ y \right\} = \cr & = \left\{ {x + y} \right\} + \left\lfloor {\left\{ x \right\} + \left\{ y \right\}} \right\rfloor = \cr & = \left\{ {x + y} \right\} + \left[ {1 \le \left\{ x \right\} + \left\{ y \right\}} \right] \cr} $$ where $[P]$ denotes the Iverson bracket

From these, you can get a rough estimate, considering that the fractional part is less than one, and on avg. it can be take to equal $1/2$.
Then it depends on the approximation you need to reach.

A further point is that $$ \eqalign{ & \left\lfloor {x + y} \right\rfloor = \cr & = \left\lfloor x \right\rfloor + \left\lfloor y \right\rfloor + \left\lfloor {\left\{ x \right\} + \left\{ y \right\}} \right\rfloor = \cr & = \left\lfloor x \right\rfloor + \left\lfloor y \right\rfloor + \left[ {1 - \left\{ x \right\} \le \left\{ y \right\}} \right]\quad \Rightarrow \cr & \Rightarrow \;\quad \left\lfloor {{{N + 1} \over a}} \right\rfloor = \left\lfloor {{{N - 1} \over a}} \right\rfloor + \left\lfloor {{2 \over a}} \right\rfloor + \left[ {1 - \left\{ {{2 \over a}} \right\} \le \left\{ {{{N - 1} \over a}} \right\}} \right] \cr} $$ which for $a=1$ and for $a=2$ gives simple results, and for $3 \le a$ becomes $$ \eqalign{ & \left\lfloor {{{N + 1} \over a}} \right\rfloor \quad \left| {\;3 \le a} \right.\quad = \cr & = \left\lfloor {{{N - 1} \over a}} \right\rfloor + \left[ {{{a - 2} \over a} \le \left\{ {{{N - 1} \over a}} \right\}} \right] = \cr & = \left\lfloor {{{N - 1} \over a}} \right\rfloor + \left[ {a - 2 \le \left( {N - 1} \right)\bmod a} \right] = \cr & = \left\lfloor {{{N - 1} \over a}} \right\rfloor + \left[ {a - 2 = \left( {N - 1} \right)\bmod a} \right] + \left[ {a - 1 = \left( {N - 1} \right)\bmod a} \right] = \cr & = \left\lfloor {{{N - 1} \over a}} \right\rfloor + \left[ {0 = \left( {N + 1} \right)\bmod a} \right] + \left[ {0 = N\bmod a} \right] = \cr & = \left\lfloor {{{N - 1} \over a}} \right\rfloor + \left[ {a\backslash N} \right] + \left[ {a\backslash \left( {N + 1} \right)} \right] \cr} $$ so that the sum of the two terms differ for the number of divisors of $N$ and $N+1$.

0
On

Those are basically partial sums of the divisor counting function. Note that $$ \sum_{a \leq n} \left \lfloor \frac n a \right \rfloor = \sum_{\substack{a \leq n \\ b \leq a/n }} 1 = \sum_{ab \leq n} 1 = \sum_{m \leq n} \tau(m)$$ Now $$\sum_{a \leq N} \left \lfloor \frac {N+1} a \right \rfloor = \sum_{a \leq N+1} \left \lfloor \frac {N+1} a \right \rfloor - 1 = \sum_{m \leq N+1} \tau(m) - 1$$ and $$\sum_{a \leq N} \left \lfloor \frac {N-1} a \right \rfloor = \sum_{a \leq N-1} \left \lfloor \frac {N-1} a \right \rfloor = \sum_{m \leq N-1} \tau(m)$$ so your sum equals $$\sum_{a=1}^{N} \left({\left\lfloor{\frac{N+1}{a}}\right\rfloor + \left\lfloor{\frac{N-1}{a}}\right\rfloor}\right) = 2 \sum_{m \leq N-1} \tau(m) + \tau(N) + \tau(N+1) - 1$$ Finding a closed form is thus equivalent to finding a closed form for partial sums of the divisor function, which is too much to hope for. The state of the art is (https://en.wikipedia.org/wiki/Divisor_problem) $$\sum_{m \leq N-1} \tau(m) = N \log N + (2\gamma - 1)N + O_\epsilon(N^{\theta +\epsilon})$$ with $\theta = 131/416$. To get an asymptotic for your expression, simply multiply this by $2$ (because the three other terms are $O_\epsilon(N^\epsilon)$).