For a monoatomic molecule, $$ \frac{1}{2} m \langle c^2\rangle = \frac{3}{2}kT. $$ If I multiply by total number of molecules, $$ \frac{1}{2} Nm \langle c^2\rangle = \frac{3}{2} NkT = \frac{3}{2} pV. $$ Dividing both sides by $3/2$, $$ \frac{1}{3} Nm \langle c^2\rangle = pV\,. $$ However, for diatomic molecules,
$m \langle c^2\rangle/2$ is not $3kT/2$. The energy of the molecules is instead given by equipartition theorem.
So I was expecting a different equation for diatomic molecules, where the coefficient $1/3$ is $1/f$, $f$ being the degree of freedom. However, my notes say that $Nm \langle c^2\rangle/3 = pV$ can apply for diatomic molecules so now I'm confused. What's wrong with my reasoning?