  Let $m\ge 2$ be a fixed positive integer. Suppose that $m^j \leq n< m^{j+1}$
is a positive integer for some $j\ge 0$. Denote $b_{m}(n)$ the number of
$m$-ary partitions of $n$, where each part of the partition is a power of $m$.
In this paper, we show that $b_m(n)$ can be represented as a $j$-fold summation
by constructing a one-to-one correspondence between the $m$-ary partitions and
a special class of integer sequences rely only on the base $m$ representation
of $n$. It directly reduces to Andrews, Fraenkel and Sellers' characterization
of the values $b_{m}(mn)$ modulo $m$. Moreover, denote $c_{m}(n)$ the number of
$m$-ary partitions of $n$ without gaps, wherein if $m^i$ is the largest part,
then $m^k$ for each $0\leq k<i$ also appears as a part. We also obtain an
enumeration formula for $c_m(n)$ which leads to an alternative representation
for the congruences of $c_m(mn)$ due to Andrews, Fraenkel, and Sellers.
