  We find necessary and sufficient conditions for the existence of a
probability measure on $\mathbb{N}_0$, the nonnegative integers, whose first
$n$ moments are a given $n$-tuple of nonnegative real numbers. The results,
based on finding an optimal polynomial of degree $n$ which is nonnegative on
$\mathbb{N}_0$ (and which depends on the moments), and requiring that its
expectation be nonnegative, generalize previous results known for $n=1$, $n=2$
(the Percus-Yamada condition), and partially for $n=3$. The conditions for
realizability are given explicitly for $n\leq5$ and in a finitely computable
form for $n\geq6$. We also find, for all $n$, explicit bounds, in terms of the
moments, whose satisfaction is enough to guarantee realizability. Analogous
results are given for the truncated moment problem on an infinite discrete
semi-bounded subset of $\mathbb{R}$.
