Let e6a45a7e57ed4ea9f6285" title="Click to view the MathML source">Zn be the ring of residue classes modulo n , and let 82f2892e5b7160a0faa38229"> be the group of its units. 90 years ago, Brauer obtained a formula for the number of representations of e5f2fe9" title="Click to view the MathML source">c∈Zn as the sum of k units. Recently, Yang and Tang (2015) [6] gave a formula for the number of solutions of the equation with e6e96a11696">. In this paper, we generalize this result. We find an explicit formula for the number of solutions of the equation e5bfb5a3d"> with b18e002673d82cd4f">.