the distance XO using n as an integer is given by