The Friedmann fluid equation I am referring to is: $$ a\frac{d\rho}{da} = -3(\rho+P) .$$
In the non-relativistic (low temperature) case for an ideal gas universe (representing matter), I know that the result is supposed to be that $\rho$ scales as $a^{-3}$. However, we know for the ideal non relativistic gas that: $$E=\frac{3}{2}kT.$$ Therefore, using $PV=kT$, we have $P=\frac{2}{3}\rho$. Substituting that to the Friedmann equation, the solution is that the density scales as the 5th power of $1/a$ instead of the 3rd. What's going on here?