# Closed form for $\frac{x}{1+x} +\frac{x^2}{1+x+x^2} +\frac{x^3}{1+x+x^2+x^3}+…$

I am trying to evaluate this infinite series that looks beautiful to me $$S=\sum_{n=1}^{\infty} \frac{x^n}{1+x+...+x^n}$$ All I could do is prove that it converges for $|x|<1$ and I tried to find a suitable form so that I can exploit it with an integral, however I was not successful. I would love to see a closed form. (this is a question that was also posted on other sites like AoPS but it didnt receive an answer so I hope no one minds if I post here too)

• This is $$\sum_{n=1}^\infty(d(n)-d(n-1))x^n$$ where $d(0)=0$ and, for every $n\geqslant1$, $d(n)$ is the number of divisors of $n$, also denoted $\sigma_0(n)$ or $\sigma(n)$. – Did Apr 20 '18 at 17:09
• @Did Interesting, so this is the generating function for $d(n) - d(n-1)$. Do you happen to have any combinatorial insight why this would be true? – user159517 Apr 20 '18 at 17:11
• Algebraically, this follows readily from the identity $$1+x+\cdots+x^n=\frac{1-x^{n+1}}{1-x}$$ Combinatorially, one would first have to explain the series in the question combinatorially... – Did Apr 20 '18 at 17:13
• Please look at the OEIS sequence A051950 generating function. – Somos Apr 20 '18 at 18:08
• I get $\sum_{n=1}^\infty \left(d(n+1)-d(n)\right)x^n$ – ccorn Apr 20 '18 at 18:13

We can make use of the Lambert series:

$$S(x)=\sum_{n=1}^{\infty}\frac{x^n}{\sum_{k=0}^nx^k}=\sum_{n=2}^{\infty}\frac{x^{n-1}-x^n}{1-x^n}=\left(\frac{1}{x}-1\right)L(1,x)-1,$$

where $L(f,q)$ is the Lambert generating function of $f$:

$$L(f,q):=\sum_{n=1}^{\infty}\frac{f(n)q^n}{1-q^n}=\sum_{n=1}^{\infty}(f*1)(n)q^n$$

and $*$ is Dirichlet convolution. Plugging in $L(1,q)=\frac{\psi_q(1)+\ln(1-q)}{\ln(q)}$, where $\psi_q(z)$ is the $q$-digamma function, we have

$$S(x)=\left(\frac{1}{x}-1\right)\frac{\psi_x(1)+\ln(1-x)}{\ln(x)}-1.$$

If you want a power series you may write it, as @did pointed out, as

$$S(x)=\sum_{n=1}^{\infty}(\sigma_0(n+1)-\sigma_0(n))x^n,$$

where $\sigma_0(n)$ is the divisor function which counts the number of divisors of $n$.

• i must say :D the answers are totally marvellous :D simply and straight – Jose Garcia Apr 20 '18 at 18:09
• @ccorn Oops that’s a typo. Will fix it. – Jacob Apr 20 '18 at 18:24