The relation between Force of Attraction (between electrons and nucleus), distance and nuclear charge is as follow,
F ∞ Z / d²
Where;
F = Force of attraction
Z = Nuclear Charge
d = Distance between electron and nucleus
According to this formula, the force of attraction decreases four times when the distance is increased two times. While force of attraction decreases two times if nuclear charge (number of protons) is decreased two times. As the distance increases the shielding effect (due to core electrons) increases which decreases the net attraction. Hence, distance has greater effect on forces of attraction as compared to nuclear charge.