TITLE: $2$-adic valuations: a tale of two $q$-series
QUESTION [9 upvotes]: Let $\nu_p(n)$ denote the $p$-adic valuation of $n$, i.e. the highest power of $p$ dividing $n$.
Consider the following two $q$-series formed by infinite products
$$\prod_{n\geq1}\left(\frac{1+q^n}{1-q^n}\right)^2=\sum_{k\geq0}a_k\,q^k \qquad \text{and} \qquad
\prod_{n\geq1}\left(\frac{1+q^n}{1-q^n}\right)^n=\sum_{k\geq0}b_k\,q^k.$$
Both $a_k$ and $b_k$ have combinatorial interpretations in the context of partitions. One reference for $b_k$ would be: Corteel, S., Savelief, C., Vuletić, M.: Plane overpartitions and cylindric partitions. J. Combin. Theory Ser. A 118(4), 1239–1269 (2011). Some references for $a_k$ include: Jeremy Lovejoy, Overpartition pairs, Annales de l'institut Fourier, vol.56, no.3, p.781-794, 2006.
I would like to ask:

QUESTION. Is this true? If $k=j^2\geq1$ is a perfect square, then we have $\nu_2(a_k)=2=\nu_2(2b_k)$.

ADDED. I thought it might be proper to record the following extension: if
$$\prod_{n\geq1}\left(\frac{1+q^n}{1-q^n}\right)^r=\sum_{k\geq0}a_k^{(r)}q^k$$
and (once again) $k=j^2$, then $\nu_2(a_k^{(r)})=\nu_2(2r)$ independent of $j$.

REPLY [14 votes]: First notice that
$$\frac{1+q^n}{1-q^n} = 1 + 2\frac{q^n}{1-q^n}.$$
Computing modulo $8$, we have
$$\left(\frac{1+q^n}{1-q^n}\right)^2 \equiv 1 + 4\frac{q^n}{1-q^{2n}}\pmod8.$$
Correspondingly,
$$\prod_{n\geq 1}\left(\frac{1+q^n}{1-q^n}\right)^2 \equiv 1+ 4\sum_{n\geq 1} \frac{q^n}{1-q^{2n}}\pmod8.$$
For $k=2^s m$ with $s\geq 0$ and odd $m$, we have
$$a_k = [q^k]\ \prod_{n\geq 1}\left(\frac{1+q^n}{1-q^n}\right)^2 \equiv 4\tau(m)\pmod8,$$
where $\tau(m)$ is the number of divisors of $m$. If $k$ is a square, then $\tau(m)$ is odd, proving the result for $\nu_2(a_k)$.

Similarly, we have
$$\left(\frac{1+q^n}{1-q^n}\right)^n \equiv 1 + 2n\frac{q^n}{1-q^n}\pmod4$$
and
$$\prod_{n\geq 1}\left(\frac{1+q^n}{1-q^n}\right)^n\equiv 1+ 2\sum_{n\geq 1} n\frac{q^n}{1-q^{n}}\pmod4.$$
And again for $k=2^sm$, we have
$$b_k = [q^k]\ \prod_{n\geq 1}\left(\frac{1+q^n}{1-q^n}\right)^n \equiv 2\tau(m)\pmod{4},$$
proving the result for $\nu_2(b_k)$.

For the ADDED part, with the help of Lemma 4.7 for $p=2$ in this paper we have
$$\prod_{n\geq 1}\left(\frac{1+q^n}{1-q^n}\right)^r\equiv 1+ 2r\sum_{n\geq 1} \frac{q^n}{1-q^{(1+[t>0])n}}\pmod{2^{t+2}},$$
where $t:=\nu_2(r)$. Then
$$a_k^{(r)} = [q^k]\ \prod_{n\geq 1}\left(\frac{1+q^n}{1-q^n}\right)^r \equiv 2r\cdot\tau(k)\pmod{2^{t+2}},$$
implying that $\nu_2(a_k^{(r)}) = \nu_2(2r) = t+1$ when $k$ is a square.