  This paper exploits the connection between the quantum many-particle density
of states and the partitioning of an integer in number theory. For $N$ bosons
in a one dimensional harmonic oscillator potential, it is well known that the
asymptotic (N -> infinity) density of states is identical to the
Hardy-Ramanujan formula for the partitions p(n), of a number n into a sum of
integers. We show that the same statistical mechanics technique for the density
of states of bosons in a power-law spectrum yields the partitioning formula for
p^s(n), the latter being the number of partitions of n into a sum of s-th
powers of a set of integers. By making an appropriate modification of the
statistical technique, we are also able to obtain d^s(n) for distinct
partitions. We find that the distinct square partitions d^2(n) show pronounced
oscillations as a function of n about the smooth curve derived by us. The
origin of these oscillations from the quantum point of view is discussed. After
deriving the Erdos-Lehner formula for restricted partitions for the $s=1$ case
by our method, we generalize it to obtain a new formula for distinct restricted
partitions.
