We start from the thermodynamic expression for the Helmholtz free energy: \begin{equation} A=E-TS \label{ec35} \end{equation} Substituting $S$ for its value: \begin{equation} A=ET\left (\frac{E}{T}+Nklnq\right)=-NkTlnq \label{ec36} \end{equation} Thus, the Helmholtz equation in statistical mechanics is left: \begin{equation} A=-NkTlnq \label {ec37} \end{equation}