Generating functions are used to derive formulas for the number of representations of a positive integer by each of the quadratic forms x12+x22+x32+2x42, x12+2x22+2x32+2x42, x12+x22+2x32+4x42 and x12+2x22+4x32+4x42. The formulas show that the number of representations by each form is always positive. Some of the analogous results involving sums of triangular numbers are also given.