Earth, Titan and Venus all have large amounts of $\mathrm{N_2}$ in their atmospheres. (In the case of Venus it's a small proportion, but Venus' atmosphere is very thick, and the total mass of $\mathrm{N_2}$ is greater than Earth's.) However, other planets and moons, and Mars in particular, have hardly any. Why is this?
$\mathrm{N_2}$ is a relatively light molecule, so I suppose it could be lost to space from smaller bodies. Did Mars start with a thick nitrogen atmosphere and then lose it? Or alternatively, is there some process that produced lots of $\mathrm{N_2}$ on Earth, Titan and Venus, which didn't occur on Mars or the other outer Solar system moons? If so, what is this process likely to be?