This paper examines the choice between government expenditure on public goods and transfer payments, in the form of a pension, in an overlapping-generations model. Government expenditure is tax-financed on a pay-as-you-go basis. A utilitarian judge chooses expenditures to maximize a social welfare function. The nonlinear solution is found to involve the ratio of a welfare-weighted average income, which depends on the inequality aversion of the judge, to arithmetic mean income. An approximation for this ratio is found that produces explicit solutions for the optimal composition. The result is used to obtain an indication of “implicit” inequality aversion for a range of countries.