Allow negative n in is_power