Let $Q(n)$ give the number of ways of writing the integer $n$ as a sum of positive integers without regard to order with the constraint that all integers in a given partition are distinct. Equation $(11)$ on this page mentions (without proof) a recurrence relation for $Q(n)$,
$$Q(n) = s(n) + 2\sum_{i=1}^\sqrt{n}(-1)^{k+1}Q(n-k^2)$$
where
$$s(n) = \begin{cases} (-1)^j,& \text{if } n= j(3j \pm 1)/2\\ 0, & \text{otherwise} \end{cases}$$
What is the proof of this fact?