TITLE: Generating function for $3$-core partitions
QUESTION [8 upvotes]: Let $\lambda$ be an integer partition: $\lambda=(\lambda_1\geq\lambda_2\geq\dots\geq0)$. Further, let $h_u$ denote the hook-length of the cell $u$.
We call $\lambda$ a $t$-core partition if none of its hooks $h_u$ equals $t$.  Define $c_t(n)$ to be the number of partitions of $n$ that are $t$-core partitions. It's well-known that
$$\sum_{n\geq0}c_t(n)\,q^n=\prod_{k=1}^{\infty}\frac{(1-q^{tk})^t}{1-q^k}.$$
For example, $\sum_{n=0}^{\infty}c_2(n)\,q^n=\sum_{k=0}^{\infty}q^{\binom{k+1}2}$.
Now, consider only those partitions of $n$ with distinct parts and let $d_t(n)$ be the number of such partitions that are $t$-cores. Then it is easy to see $d_2(n)=c_2(n)$.

QUESTION. Is this true?
$$\sum_{n\geq0}d_3(n)\,q^n=\sum_{k\geq0}q^{k^2}
+\sum_{k\geq1}q^{2\binom{k+1}2}.$$

Note that I have simplified the generating function from
$$\frac12\prod_{n\geq1}(1-q^{2n})(1+q^{2n-1})^2+\prod_{n\geq1}(1-q^{2n})(1+q^{2n})^2-\frac12.$$

REPLY [13 votes]: The set of $3$-core partitions can be described explicitly. 
Theorem The partition $\lambda=\{\lambda_1,\lambda_2,\dots\}$ of length $k$ (that is, $\lambda_k > 0$ but $\lambda_{k+1} = \lambda_{k+2} = \cdots = 0$) is a $3$-core if and only if the sequence of differences $\{\lambda_1-\lambda_2,\lambda_2-\lambda_3,\dots,\lambda_k - \lambda_{k+1}\}$ is of the form $\{2,2,\dots,2,1,0,1,0,\dots ,1\}$ or $\{2,2,\dots,2,0,1,0,1,\dots ,1\}$.
Proof: It is easy to check by hand that a $3$-hook appears in the situations where

a) some member of the sequence is $\geq 3$,
b) two members of the sequence in a row are $0$'s,
c) there is a $1$ in the sequence that is not followed by a $0$,
d) there is a $0$ in the sequence that is not followed by a $1$.

These correspond to the four possible shapes of a $3$ hook-strip in the boundary. If all of these patterns are avoided, then the partition has no hooks of length $3$.
Therefore the partitions with distinct parts that are $3$-cores have a difference sequence $\{2,2,\dots,2\}$ or $\{2,2,\dots,2,1\}$. The size of the partitions in the first case are given by $2\binom{k+1}{2}$ and the sizes in the second case are given by $k^2$, where $k\geq 1$, and this implies your generating function.