Given all the partitions of a number $N$, how many occurrences are there of a number $K$? I am wondering about the problem briefly stated in the title.
Given two arbitrary integers $N$ and $K$, with $K<N$, I am interested in how many times the number $K$ appears in all the possible partitions of $N$.
I am unsure where the problem complexity lies anywhere in the range from "trivial" to "unsolved", as my combinatorics/number theory is only elementary.
I work with "huge" $N$'s so the asymptotic formula of Hardy well applies and the total number of partitions can be found. Now, how to "count" in each of them how many $K$'s appear, is a different problem altogether...
Many thanks for your help, always the most appreciated.
 A: Let $p(N)$ be the partition function. Then the answer is $$p(N-K)+p(N-2K)+p(N-3K)+\ldots$$
in which you deliberately double-count, triple-count, etc, the partitions which include more than one copy of $K$. You can see the actual numbers, with a little more information, including a generating function, here.
Edit. This paper (PDF file) is linked by the OEIS article. For extra confirmation, have a look at page 457 of Elementary Methods in Number Theory by M. B. Nathanson. In the course of proving Theorem 15.1, the expression above is stated and used.
A: Here is some additional material. The generating function of the partition numbers is
$$P(x) = \prod_{k\ge 1} \frac{1}{1-x^k}.$$
It follows that the generating function of partitions with the number $k$ marked is
$$Q(x,u) = \frac{1-x^k}{1-ux^k}\prod_{k\ge 1} \frac{1}{1-x^k}.$$
Therefore the generating function of the total count of ocurrences of $k$ on all partitions of $n$ is given by
$$\left.\frac{\partial}{\partial u} Q(x,u)\right|_{u=1}.$$
This is
$$\left. \frac{1-x^k}{(1-ux^k)^2}\times (-x^k)\times
\prod_{k\ge 1} \frac{1}{1-x^k} \right|_{u=1}
\\ = \frac{x^k}{1-x^k}
\prod_{k\ge 1} \frac{1}{1-x^k} =
\frac{x^k}{1-x^k} P(x).$$
Extracting coefficients we get
$$[x^n] \left.\frac{\partial}{\partial u} Q(x,u)\right|_{u=1}
= \sum_{q=1}^{\lfloor n/k\rfloor} p(n-qk)$$
which is
$$p(n-k)+p(n-2k)+p(n-3k)+\cdots$$
