With $s(n)=\sum_{k=1}^n n \bmod k$, can be justified that $\forall\epsilon>0$ let us $\lim_{n\to\infty}\frac{s(n-1)}{\epsilon+s(n)}=1?$

82 Views Asked by At

Denoting as

$$s(n)=\sum_{k=1}^n n \bmod k$$ the sum of remainders function (each remainder is defined as in the euclidean division of integers $n\geq 1$ and $k$). See [1] for example.

For examples $s(1)=0$ and $$s(6)=0+6\bmod4+6\bmod5+0=2+1=3.$$

After some computational experiments I am interesting in

Question. Can you prove or refute (too are welcome heuristics) that $\forall\epsilon>0$ $$\lim_{n\to\infty}\frac{s(n-1)}{\epsilon+s(n)}=1?$$ Similarly that $\forall\epsilon>0$ $$\lim_{n\to\infty}\frac{s(n)}{\epsilon+s(n-1)}=1?$$ Thanks in advance, it seems curious, and I believe that previous is a strong condition in the sense that its proof could be easy, or well in the sense that find a counterexample could be easy (I am refering to the presence of such $\epsilon$).

I don't know if previous exercises are in the literature.

There are formulas involving this function (see [1] for example) with the sum of divisors function $\sigma(n)=\sum_{d\mid n}d$, that holds for each integer $n>1$

$$\sigma(n)+s(n)=s(n-1)+2n-1,$$

and a companion formula that can be deduced inductively from previous (see too in [1]).

Well my experiements aren't the bests, neither I have enough resolution to see the limit, but there is a difference when I plot $\frac{s(n)}{s(n-1)}$ ($n\geq 5$) or $\frac{\sigma(n)}{\sigma(n-1)}$ or $\frac{\phi(n)}{\phi(n-1)}$, where this last is Euler's totient function.

References:

[1] Math Overflow, How to calculate the sum of remainders of N? https://mathoverflow.net/questions/195325/how-to-calculate-the-sum-of-remainders-of-n

I've read the notes from two authors Spivey and Cross.

2

There are 2 best solutions below

2
On BEST ANSWER

If I have well understood, you put $n=qk+r(n,k)$ with $0\leq r(n,k)<k$, and then $\displaystyle s(n)=\sum_{k=1}^n r(n,k)$. For $k\geq 1$, you have $\displaystyle q=[\frac{n}{k}]$ ($[x]$ is the integer $m$ such that $m\leq x<m+1$). Hence your sum is $$s(n)=\sum_{k=1}^n (n-k[\frac{n}{k}])=n^2-n^2(\frac{1}{n}\sum_{k=1}^{n}\frac{k}{n}[\frac{n}{k}])$$

Put $\displaystyle f(x)=x[\frac{1}{x}]$ for $0<x\leq 1$ and $f(0)=0$. Then $$ R_n=\frac{1}{n}\sum_{k=1}^{n}\frac{k}{n}[\frac{n}{k}]=\frac{1}{n}\sum_1^n f(\frac{k}{n})$$ is a Riemann sum relative to $[0,1]$, and the function $f$. This function is Riemann-integrable on $[0,1]$ (as $f(x)\leq 1$ for all $x$, and that the function is clearly Riemann-integrable on $[a,1]$ for every $a\in ]0,1[$). It is easy to compute the integral:

$$\int_0^1f(t)dt=\sum_{k\geq 1}\int_{1/(k+1)}^{1/k}f(t)dt=\sum_{k\geq 1}u_k$$ with $$u_k=\int_{1/(k+1)}^{1/k}ktdt=\frac{k}{2}(\frac{1}{k^2}-\frac{1}{(k+1)^2})=\frac{1}{2}(\frac{1}{k}-\frac{1}{k+1})+\frac{1}{2(k+1)^2}$$

Hence $$\sum_{k\geq 1} u_k=\frac{1}{2}+\frac{1}{2}\sum_{k\geq 1}\frac{1}{(k+1)^2}=\frac{\pi^2}{12}$$

Now you have $\displaystyle s(n)\sim n^2(1-\frac{\pi^2}{12})$ and it is easy to finish.

3
On

It is easy to see that $$ s(n)=\Bigl\lfloor\frac{n}{k}\Bigr\rfloor\sum_{j=1}^{k-1}j+\sum_{j=1}^{n\bmod k}j. $$ Then $\lim_{n\to\infty}s(n)=\infty$ and $s(n)-s(n-1)<k$. It follows that $$ \frac{s(n)}{s(n-1)}=1+O\Bigl(\frac1n\Bigr). $$