Stable nuclei have roughly the same number of protons and neutrons. Nuclei with identical Z but different numbers of neutrons are said to be isotopes of the same element. So the nucleus is a mix of protons and neutrons. If it is stable the forces of repulsion and attraction must balance. What are these forces.
Gravity exists between the particles, but is too weak to be a factor.
The weak force is not a factor either. This is attractive and operates equally effectively between p, p and n, and n and n. Hence, the presence of some neutrons increases the attractive force within the nucleus, as the sketch of 4He at the left shows. In thinking about these questions keep in mind that the em force is a long range force, but the sn force is a very short range force. These are special products in the sense that, in all but the dense cores of supernovae, the neutrinos escape their stellar interior and trundle off on a long journey through space.