Proof that the following function is a polynomial I've been trying to get my head around this problem for a long time, yet I have not been able to make much progress.
Let $\ell_0(j) = \left\lfloor \frac{1}{2}\left( \sqrt{8j^2 - 8j + 1} + 2j - 1 \right) \right\rfloor$.
Then, prove that the following function $P(j,s)$ is a polynomial in $s$ for all positive integers $j$:
$$P(j,s) = \frac{1}{1 - s^{\ell_0(j)}}\sum_{\ell =1}^{\ell_0(j)}\left((-1)^\ell \left( \frac{s^{\ell(\ell+3)/2 - (j+1)\ell - j(j-1)/2}}{1-s^\ell}  \right) \prod_{k=\ell}^{\ell_0(j)}(1-s^k)^2\right) $$
If anybody could suggest anything, I would greatly appreciate it. Thanks!
 A: Some (possibly) useful simplications:
I thought it might be helpful to write $P(j,s)$ as
\begin{equation*}
P(j,s) = \frac{(1-s^{l_{0}(j)})}{s^{j(j-1)}}\sum_{l=1}^{l_{0}(j)}(-1)^{l}(1 - s^{l})s^{l(l+3)/2 - (j+1)l + j(j-1)/2} \prod_{k=l+1}^{l_{0}(j)-1}(1-s^{k})^{2}.
\end{equation*}
The benefit of this is that 
\begin{equation*}
g(l) := l(l+3)/2 - (j+1)l + j(j-1)/2 = \frac{l^{2}}{2} - (j-\frac{1}{2})l + j(j-1)/2
\end{equation*}
is a quadratic in $l$ whose minimum over $l \in \mathbb{Z}$ is $0$, which occurs at $l = j, j-1$. Simply observe that
\begin{align*}
g(j) & = \frac{j^{2}}{2} - j^{2} + j/2 + j(j-1)/2 = 0\\
g(j-1) & = \frac{(j-1)^{2}}{2} - (j-\frac{1}{2})(j-1) + j(j-1)/2\\
& = \frac{j^{2} - 2j + 1}{2} - j^{2} + j + \frac{j}{2} - \frac{1}{2} + \frac{j^{2}}{2} - \frac{j}{2}\\
 & = 0.
\end{align*}
So at this point one just has to show that 
\begin{equation}
Q(j,s) = \sum_{l=1}^{l_{0}(j)}(-1)^{l}(1 - s^{l})s^{l(l+3)/2 - (j+1)l + j(j-1)/2} \prod_{k=l+1}^{l_{0}(j)-1}(1-s^{k})^{2}
\end{equation}
is divisible by $s^{j(j-1)}$, which is always a positive power of $s$ for integer $j$. One possible way to do this might be to show that $Q$ and its derivatives with respect to $s$ up to order $j(j-1) - 1$ are zero at $s = 0$. However, I'm not sure how to proceed with that yet.
Finally, I haven't verified it yet, but it seems that $l_{0}(j) = \lfloor ( 1+ \sqrt{2})j - \frac{1 + \sqrt{2}}{2} \rfloor$. I experimentally verified it for $1 \leq j \leq 1000000$ at least, but will have to do some floor manipulation to prove it if it is indeed true. 
