The Boltzmann constant k (alternatively k) may be used in place of the molar gas constant by working in pure particle count, N, rather than amount of substance, n, since:
where N is the Avogadro constant.
For example, the ideal gas law in terms of the Boltzmann constant is:
where N is the number of particles (molecules in this case), or to generalize to an inhomogeneous system the local form holds:
where ρ = N/V is the number density.