Gravitational force by earth on an object of mass m at its surface

$$ mg = \frac{GMm}{R^2} $$

$$ g = \frac{GM}{R^2} $$