  In 1857 Sylvester established an elegant theory that certain counting
functions, which he termed denumerants, are quasipolynomials by decomposing
them into a polynomial part and a finite set of periodic parts. Each component
of the decomposition, called a Sylvester wave, corresponds to a root of unity
(the polynomial part corresponding to $1$). Recently several researchers, using
either combinatorial or complex analytic techniques, obtained explicit formulas
for the waves. In this work, we develop an algebraic approach to the
Sylvester's theory. Our methodology essentially relies on deriving $q$-partial
fractions of the generating functions of the denumerants, and thereby obtain
new and explicit formulas for the waves. The formulas we obtain are expressed
in terms of reciprocal polynomial of the degenerate Bernoulli numbers and
inverse DFT of a generalized Fourier-Dedekind sum. Further, we also prove
certain reciprocity theorems of the generalized Fourier-Dedekind sums and a
structure result on the top-order terms of the waves. The proofs rely on our
symbolic evaluation operator and our far reaching generalization of the
Heaviside's cover-up method for partial fractions.
