<s>[INST] Calculation of a strange series Is it possible to find an expression for:
$$S(N)=\sum_{k=0}^{+\infty}\frac{1}{\sum_{n=0}^{N}k^n}?$$
For $N=1$ we have
$$S(1) = \displaystyle\sum_{k=0}^{+\infty}\frac{1}{1 + k} = \displaystyle\sum_{k=1}^{+\infty}\frac{1}{k}$$
which is the (divergent) harmonic series. Thus, $S (1) = \infty$.
For $N=2$ this sum is:
$$S(2)=\sum_{k=0}^{+\infty}\frac{1}{1+k+k^2}$$
which can be expressed as:
$$S(2)=-1+\frac{1}{3}\sqrt 3 \pi \tanh(\frac{1}{2}\pi\sqrt 3)\approx 0.798$$
For $N=3$ we have:
$$S(3)=\frac{1}{4}\Psi(I)+\frac{1}{4I}\Psi(I)-\frac{1}{4I}\pi\coth(\pi)+\frac{1}{4}\pi\coth(\pi)+\frac{1/}{4}\Psi(1+I)-\frac{1}{4I}\Psi(1+I)-\frac{1}{2}+\frac{1}{2}\gamma \approx 0.374$$
 [/INST] Perform a partial fraction decomposition:
$$
  \frac{1}{p(k)} = \frac{1}{1+k+\cdots+k^{n-1}} = \frac{1}{ \prod_{m=1}^{n-1}\left(k-\exp\left(i \frac{2 \pi}{n} m \right)\right)} = \sum_{m=1}^{n-1} \frac{1}{k-\exp\left(i \frac{2 \pi}{n} m \right)} \frac{1}{p^\prime\left(\exp\left(i \frac{2 \pi}{n} m \right)\right)}
$$
Now:
$$
  p^\prime\left(z\right) = \sum_{m=1}^{n-1} m z^{m-1} = \frac{\mathrm{d}}{\mathrm{d}z} \sum_{m=0}^{n-1} z^{m} = \frac{\mathrm{d}}{\mathrm{d}z} \frac{1-z^n}{1-z} = \frac{z-z^n (n-z(n-1))}{z (1-z)^2}
$$
Therefore, using $z^n=1$ for $z=\exp\left(i \frac{2 \pi}{n} m \right)$:
$$
c_m := \frac{1}{p^\prime\left(\exp\left(i \frac{2 \pi}{n} m \right)\right)} = \frac{1}{n} \exp\left(i \frac{2 \pi}{n} m \right) \left( \exp\left(i \frac{2 \pi}{n} m \right) - 1 \right) = \frac{1}{n} \exp\left(i \frac{2 \pi}{n} m \right) \left( \exp\left(i \frac{2 \pi}{n} m \right) - 1 \right) 
$$
We thus have, and using $\sum_{m=1}^{n-1} c_m = 0$:
$$ \begin{eqnarray}
   \sum_{k=0}^\infty \frac{1}{p(k)} &=& \sum_{k=0}^\infty \sum_{m=1}^{n-1} \frac{c_m}{k-\exp\left(i \frac{2 \pi}{n} m \right)} = \sum_{k=0}^\infty \sum_{m=1}^{n-1} c_m \left(\frac{1}{k-\exp\left(i \frac{2 \pi}{n} m \right)} - \frac{1}{k+1}\right) \\ &=&  -\sum_{m=1}^{n-1} c_m \sum_{k=0}^\infty \left(\frac{1}{k+1} - \frac{1}{k-\exp\left(i \frac{2 \pi}{n} m \right)}\right) \\ &=&  -\sum_{m=1}^{n-1} c_m \left( \gamma + \psi\left(-\exp\left(i \frac{2 \pi}{n} m \right)\right)\right)
\end{eqnarray}
$$
Again, making use of $\sum_{m=1}^{n-1} c_m = 0$ we arrive at:
$$
 \sum_{k=0}^\infty \frac{1}{1+k+\cdots+k^{n-1}} = \sum_{m=1}^{n-1} \frac{1}{n} \exp\left(i \frac{2 \pi}{n} m \right) \left(1- \exp\left(i \frac{2 \pi}{n} m \right) \right)  \cdot  \psi\left(-\exp\left(i \frac{2 \pi}{n} m \right)\right)
$$
where $\psi(x)$ denotes the digamma function.
</s>