The relation is quite straightforward.
The energy injected into a unit of propellant before it evaporates and spent on evaporating it is minuscule comparing to energy applied to the propellant as gas; and for gas of similar pressure and temperature the number of particles per unit of volume varies very little. As result, approximation that assumes each particle of propellant, no matter what propellant it is, receives about the same amount of energy from the reactor core, is quite close to accurate. So let's take the equations for kinetic energy and specific impulse as function of exhaust velocity:
$$E = {1 \over 2} m v^2 \\
I_{sp} = {v \over g_0} \\
v = \sqrt{ 2E \over m } \\
I_{sp} = \sqrt{ 2E \over m {g_0}^2}
$$
$g_0$ is a constant. We assume each particle receives about the same amount of energy. Therefore,
$$ I_{sp} ∝ m^{-1/2}$$
where $m$ is the mass of a particle of the propellant.
If $ I_{sp}$ for monoatomic hydrogen (not really doable, but just to establish baseline) was 1 (of some unit, it's not quite important what), then:
- One $H_2$ particle weighs about 2u, $\sqrt{1/2} = 0.7$
- A helium atom is about 4u, $\sqrt{1/4} = 0.5$
- A lithium atom is about 7u, $\sqrt{1/4} = 0.37$
- One $H_2O$ particle is about 18u, $\sqrt{1/18} = 0.23$
- Zinc was proposed in one of questions on this site. One $Zn$ atom is about 65u, $\sqrt{1/65} = 0.12$
- If for some perverse reason you wanted to use xenon, 131u, $\sqrt{1/131} = 0.08$
As you can see, hydrogen leaves the competition in the dirt. Helium is somewhat comparable, but there are no big advantages using it over hydrogen, and for any hydrogen-rich compounds (say, methane), the savings are mostly lost in the mass of the binding atom ruining the total performance.
edit: adding other gases you're asking about: $Ar$: 0.16; $N_2$: 0.19; $O_2$: 0.18. Hydrogen is more than three times better than the best of them (Nitrogen).