  The main aim of this paper is twofold: (1) Suggesting a statistical
mechanical approach to the calculation of the generating function of restricted
integer partition functions which count the number of partitions --- a way of
writing an integer as a sum of other integers under certain restrictions. In
this approach, the generating function of restricted integer partition
functions is constructed from the canonical partition functions of various
quantum gases. (2) Introducing a new type of restricted integer partition
functions corresponding to general statistics which is a generalization of
Gentile statistics in statistical mechanics; many kinds of restricted integer
partition functions are special cases of this restricted integer partition
function. Moreover, with statistical mechanics as a bridge, we reveals a
mathematical fact: the generating function of restricted integer partition
function is just the symmetric function which is a class of functions being
invariant under the action of permutation groups. Using the approach, we
provide some expressions of restricted integer partition functions as examples.
