A spherical planet has a mass $M_P$ and diameter $D_P$. A particle of mass $m$ falling freely near the surface of this planet will experience an acceleration due to gravity, equal to:
(2012 Pre)
Acceleration due to gravity is given by $g = \frac{GM_P}{R_P^2}$. Substituting the radius as half of the diameter, $R_P = \frac{D_P}{2}$, we get $g = \frac{GM_P}{(D_P/2)^2} = \frac{4GM_P}{D_P^2}$.