Let
![$ a_1,\ldots,a_k$](abs/img1.gif)
be positive integers generating the unit
ideal, and
![$ j$](abs/img2.gif)
be a residue class modulo
![$ L =
\operatorname{lcm}(a_1,\ldots,a_k)$](abs/img3.gif)
. It is known that the function
![$ r(N)$](abs/img4.gif)
that
counts solutions to the equation
![$ x_1a_1 + \ldots + x_ka_k = N$](abs/img5.gif)
in
non-negative integers
![$ x_i$](abs/img6.gif)
is a polynomial when restricted to
non-negative integers
![$ N \equiv j \pmod L$](abs/img7.gif)
. Here we give, in the
case of
![$ k=3$](abs/img8.gif)
, exact formulas for these polynomials up to the
constant terms, and exact formulas including the constants for
![$ \mathfrak{q}= \gcd(a_1,a_2) \cdot \gcd(a_1,a_3) \cdot \gcd(a_2,a_3)$](abs/img9.gif)
of
the
![$ L$](abs/img10.gif)
residue classes. The case
![$ \mathfrak{q}= L$](abs/img11.gif)
plays a special
role, and it is studied in more detail.