An extension of a theorem of Euler