Random variable with finite moments $E(X^k)=k!$

Suppose that $$X$$ is a random variable with all of its moments finite, given by $$\mathbb{E}(X^k) = k! , k \in \mathbb{N}$$. If $$X$$ has a moment generating function, find the distribution of $$X$$.

I'm lost in here. If someone could give me a hint of how to solve it, I appreciate any help. Thanks in advance.

Consider the moment generating function $$E(e^{tX}) = \sum_{x=0}^\infty e^{tx} P(X=x) = \sum_{n=0}^\infty \frac{t^n}{n!} E(X^n) = \sum_{n=0}^\infty t^n = \frac{1}{1-t}$$ provided that $$|t|<1$$. This looks like the MGF for the Exponential distribution with parameter 1.
• Thank you very much, it is very clear. I did not use the fact of $f_X(x) = P(X=x)$. I was lost because I did not know the p.m.f. – Davshock Feb 23 at 0:55