U = (3/2)nRT then.
More in depth:
"Perfect gas" means that the attraction, repulsion and so on between the molecules are negligible. Then, the density that makes interactions more frequent plays no role, so U, H and others depend only on T.
In the case of a perfect monoatomic gas, everything boils down to language in fact. Temperature being the energy per degree of freedom (measured in Kelvin instead of Joule for historical reasons only) and monoatomic perfect gases having just the three translations, U = (3/2)nRT only means "the temperature is the temperature".
Polyatomic perfect gases add only degrees of freedom, for instance two rotations but no vibration for nitrogen under usual conditions, so that U becomes (5/2)nRT instead of (3/2) for the three translations.
Translations are practically not quantized hence store (1/2)nRT each. Rotations are so finely quantized that usually the molecules rotate freely (cryogenic hydrogen is an exception) and store (1/2)nRT each too. Vibrations are less simple:
- Each stores nRT if fully excited, not (1/2)nRT
- They are more coarsely quantized, hence get progressively excited when the temperature suffices.
- N2, H2 don't vibrate at room temperature, but heavier and less stiff Br2 and CO2 do to some extent, and the number of modes increases with the number of atoms.
- So these vibrating molecules often show a heat capacity that increases with the temperature.
- Metals are an extreme case, because 1023 atoms make the vibrations modes very finely quantized hence completely excited at room temperature. The crystal having 3 times as many vibration modes as atoms gives then a constant heat capacity of 3*nRT.
- All this still gives U depending only on T, but for instance if the gas' density approaches the liquid's one, interactions between the molecules let the energy depend on the density too.