Calculating the partition function based on molar heat capacity
All you have to do is to use some of the well known results from Statistical Thermodynamics:
The molar heat capacity at constant volume is

\begin{equation}
  \bar{c}_V = \left( \frac{\partial \bar{U}}{ \partial T} \right)_V
\end{equation}

where $\bar{U}$ is the inner energy, $T$ is the temperature, and $V$ is the volume.
The molar inner energy in terms of the partition function $Z$ and the temperature is given by:

\begin{equation}
  \bar{U} = \frac{k_{\text{B}} T^{2}}{n} \frac{\partial \ln Z}{ \partial T} \ .
\end{equation}

where $n$ is the amount of substance.

Now, you simply have to plug the equation for $\bar{U}$ into the equation for $\bar{c}_V$ and after using the chain rule of differentiation you get the following differential equation:

\begin{equation}
  \bar{c}_V = 2 \frac{k_{\text{B}}}{n}  T \frac{\partial \ln Z}{ \partial T} + \frac{k_{\text{B}}}{n} T^{2} \frac{\partial^2 \ln Z}{ \partial T^2} \ .
\end{equation}

Finally, you just have to use your formula for the molar heat capacity, $\bar{c}_V = \alpha T$, and solve the resulting differential equation

\begin{align}
  \frac{k_{\text{B}}}{n} T^{2} \frac{\partial^2 \ln Z}{ \partial T^2} + 2 \frac{k_{\text{B}}}{n}  T \frac{\partial \ln Z}{ \partial T} - \alpha T^2 &amp;= 0  \\
 \frac{\partial^2 \ln Z}{ \partial T^2} + 2 \frac{1}{T} \frac{\partial \ln Z}{ \partial T} - \frac{n \alpha}{k_{\text{B}}} &amp;= 0
\end{align}

for $\ln Z$.
If solving differential equations by hand is not your thing, you can simply charge Wolfram Alpha with the task and get:

\begin{align}
  \ln Z &amp;= \frac{n \alpha}{6 k_{\text{B}}} T^2 - C_1 \frac{1}{T} + C_2 \\
  Z &amp;= \exp\left(\frac{n \alpha}{6 k_{\text{B}}} T^2 - C_1 \frac{1}{T} + C_2 \right) \ ,
\end{align}

where $C_1$ and $C_2$ are constants of integration which can be fixed by enforcing boundary conditions for the temperature.