Let $q_r(n)$ be the number of partitions of the positive integer $n$ allowing at most $r$ repetitions of any of the parts. (For $r=1$ this is just the usual number of partitions of $n$ into distinct parts.) For $n = 5$ and $r = 2$ these partitions are precisely
5, 4 + 1, 3 + 2, 3 + 1 + 1, and 2 + 2 + 1.
So $q_2(5) = 5$.
Is there a formula (explicit or recursive) or any theory at all for $q_2(n)$ or the general $q_r(n)$?