Context: I am working on getting a recurrence of the form $$nc_n=\sum_{k=1}^nc_{n-k}R(k)\tag0$$ for the coefficients $c_n$ defined by $$f(q)=\vartheta_3^2(q)=\prod_{m\ge1}(1+q^{2m-1})^4(1-q^{2m})^2=\sum_{n\ge0}c_nq^n,\qquad c_0=1.$$
So far, I have gotten to the point $$-\frac14qf'(q)=f(q)\sum_{N\ge1}q^N\left(s_1(N)+s_2(N)\right),\tag1$$ where $$s_1(N)=\sum_{\,\,\,(n,k)\in\Bbb N^2\\ (2n-1)k=N}(-1)^k(2n-1)=\sum_{\,\,d|N\\ d\text{ odd}}(-1)^{N/d}d\tag{S1}$$ and $$s_2(N)=\sum_{(n,k)\in\Bbb N^2\\ \,2nk=N}n=\sum_{\,\,d|N\\ d\text{ even}}\frac{N}{d}.\tag{S2}$$ The LHS of $(1)$ is $$-\frac14qf'(q)=\sum_{n\ge1}\left(-nc_n/4\right)q^n,$$ while the RHS of $(1)$ is $$\begin{align} f(q)\sum_{N\ge1}q^N\left(s_1(N)+s_2(N)\right)&=\left\{\sum_{N\ge0}c_Nq^N\right\}\cdot\left\{\sum_{N\ge1}q^N\left(s_1(N)+s_2(N)\right)\right\}\\ &=\sum_{n\ge1}q^n\sum_{k=1}^nc_{n-k}(s_1(k)+s_2(k)), \end{align}$$ so that, in theory, $$nc_n=-4\sum_{k=1}^n(s_1(k)+s_2(k))c_{n-k}.\tag2$$
Problem at hand: For some reason, Desmos disagrees with $(1)$. Why is this?
My thoughts: Usually Desmos is pretty accurate with this kind of thing, so I am inclined to assume that the problem lies either in my own definitions of $s_1$ and $s_2$, or the way I write them in Desmos.
This being the case, I ask that you point out any errors I might not have caught in my derivation of $(1)$ below.
We start with the definition of $f$, and we proceed in a similar fashion to the method outlined on pages 322-3 of Introduction to Analytic Number Theory (Apostol): $$\begin{align} \ln f(q)&=\sum_{n\ge1}4\ln(1+q^{2n-1})+2\ln(1-q^{2n})\\ &=-2\sum_{n\ge1}\sum_{k\ge1}\frac1k\left(2(-1)^kq^{k(2n-1)}+q^{2kn}\right)\\ &=-2\sum_{n,k\ge1}\frac1k\left(2(-1)^kq^{k(2n-1)}+q^{2kn}\right). \end{align}$$ Differentiating and multiplying by $-q/4$, we have $$\begin{align} -\frac14q\frac{f'(q)}{f(q)}&=\sum_{n,k\ge1}\left((-1)^k(2n-1)q^{k(2n-1)}+nq^{2kn}\right)\\ &=\sum_{n,k\ge1}(-1)^k(2n-1)q^{k(2n-1)}+\sum_{n,k\ge1}nq^{2nk}\\ &=\sum_{N\ge1}q^N\sum_{k(2n-1)=N\\ \,\,\,n,k\ge1}(-1)^k(2n-1)+\sum_{N\ge1}q^N\sum_{2nk=N\\ n,k\ge1}n\\ &=\sum_{N\ge1}q^N\left(s_1(N)+s_2(N)\right), \end{align}$$ which is equivalent to $(1)$.
In the event that my definitions of $s_1$ and $s_2$ are indeed correct, perhaps my error lies in the way I define $s_1$ and $s_2$ in Desmos. Below are the relevant Desmos-definitions and their explanations. If you spot an error, please let me know.
First of all, I define $$i(d,n)=\left\lfloor e^{d\lfloor n/d\rfloor - n}\right\rfloor,$$ which gives $i(d,n)=1$ when $d|n$ and $i(d,n)=0$ otherwise. Thus for any $p:\Bbb N\to\Bbb R$ we have $$\sum_{d|n}p(d)=\sum_{d=1}^n p(d)i(d,n).$$ Then I also define $E(n)=\frac12(1+(-1)^n)$ and $O(n)=\frac12(1-(-1)^n)$, which act as characteristic functions for the even and odd integers, respectively. Thus we can write $$\sum_{1\le d\le n\\ \,d\text{ even}}p(d)=\sum_{d=1}^{n}p(d)E(d)$$ and $$\sum_{1\le d\le n\\ \,\,d\text{ odd}}p(d)=\sum_{d=1}^{n}p(d)O(d).$$ Putting this all together, we can write $$s_1(n)=\sum_{d=1}^{n}\cos(n\pi/d)d\cdot O(d)i(d,n)\tag{S1'}$$ and $$s_2(n)=\sum_{d=1}^{n}\frac{n}{d}E(d)i(d,n).\tag{S2'}$$ Note that I replaced $(-1)^{n/d}$ with $\cos(n\pi/d)$ to keep Desmos from freaking out about $-1$ raised to rational powers. Also note that instead of defining $s_1$ and $s_2$ in Desmos, I just wrote $$\sum_{d=1}^{n}\left(O(d)\cos(\pi n/d)+E(d)\frac{n}{d}\right)i(d,n)$$ instead of $s_1(n)+s_2(n)$.
I believe that $(\text{S}1)$ and $(\text{S}2)$ are equivalent to $(\text{S}1')$ and $(\text{S}2')$ respectively, but I could be wrong. If I am wrong, how so?
Thanks! :)
EDIT:
Using the recurrence $(2)$ and the OEIS sequence $\text{A}004018(n)$, I have been able to confirm that $c_n=r_2(n)=\text{A}004018(n)$ for the first few values of $n$. It seems now that the problem is with Desmos, rather than my symbolic calculations.
EDIT 2:
Indeed, if $c_n=r_2(n)$, it would suffice to prove that $$nr_2(n)=-4\sum_{k=1}^{n}(s_1(k)+s_2(k))r_2(n-k),$$ as we already know that $c_0=r_2(0)=1$.