On a functional equation