AbstractFor any commutative semigroup S and positive integer m the power function $$f: S \rightarrow S$$
f
:
S
→
S
defined by $$f(x) = x^m$$
f
(
x
)
=
x
m
is an endomorphism of S. We partly solve the Lesokhin–Oman problem of characterizing the commutative semigroups whose all endomorphisms are power functions. Namely, we prove that every endomorphism of a commutative monoid S is a power function if and only if S is a finite cyclic group, and that every endomorphism of a commutative ACCP-semigroup S with an idempotent is a power function if and only if S is a finite cyclic semigroup. Furthermore, we prove that every endomorphism of a nontrivial commutative atomic monoid S with 0, preserving 0 and 1, is a power function if and only if either S is a finite cyclic group with zero adjoined or S is a cyclic nilsemigroup with identity adjoined. We also prove that every endomorphism of a 2-generated commutative semigroup S without idempotents is a power function if and only if S is a subsemigroup of the infinite cyclic semigroup.