On a generalization of a theorem by Euler