Find the exponential generating function of the partitions of the set [n], all of whose classes have a prime number of elements.
The only thing I came up with was
$$\sum\limits_{\textrm{t prime}} = \frac{f(t) x^{t}}{t!}$$ Where $f(t)$ is the number of partitions of size t. I'm not sure if this is correct though.
You want the following theorem, which I quote from Miklós Bóna, Introduction to Enumerative Combinatorics:
Suppose that we want the exponential generating function for the number of partitions of $[n]$ into parts of size $2$. The task of organizing an $n$-element set into a $2$-element block can be carried out in $1$ way if $n=2$ and in $0$ ways if $n\ne 2$, so $A(x)=\frac{x^2}{2!}$, and the exponential generating function for the number of ways to partition $[n]$ into $2$-element blocks is therefore
$$H(x)=e^{x^2/2!}=e^{x^2/2}\;.\tag{1}$$
As a check, we know that
$$e^{x^2/2}=\sum_{n\ge 0}\frac{x^{2n}}{2^nn!}=\sum_{n\ge 0}(2n-1)!!\frac{x^{2n}}{(2n)!}\;,$$
so $(1)$ implies that
$$h_n=\begin{cases} (2n-1)!!,&\text{if }n\text{ is even}\\ 0,&\text{if }n\text{ is odd}\;, \end{cases}$$
a result justified without generating functions here.
You also want the product theorem.
Thus, the exponential generating function for the number of partitions of $[n]$ into parts of size $1,2$, or $3$ must be
$$g(x)=\left(e^{x^1/1!}\right)\left(e^{x^2/2!}\right)\left(e^{x^3/3!}\right)=\exp\left(x+\frac{x^2}2+\frac{x^3}6\right)\;.$$
Think about why the product theorem generalizes to an infinite number of tasks, and you’ll be able to get the exponential generating function that you want.