On the distance from a rational power to the nearest integer