Question about integer partitions



I'm interested in the following problem:

Given integers n and k, with k less than or equal to n, how many of the
partitions of n contain at least one partition for k?

For example of the 11 partitions for n = 6:

1 1 1 1 1 1
1 1 1 1 2
1 1 2 2
2 2 2
1 1 1 3
1 2 3
3 3
1 1 4
2 4
1 5
6

8 partitions contain a partition for k = 2, 6 for k = 3, etc.

Does anyone know of a solution for this problem, or how one might
construct a generating function?

Thanks in advance!

.