I'm trying to make a table which lists some math functions. I've been searching the net on how to center the equations in the cells both vertically and horizontally. And I think I've found an answer to it, except that no matter what I do the equations in the 3rd column won't align, and just stays on the top. I use the array package. What am I doing wrong?
\begin{table}[H]
\centering
\newcolumntype{A}{ >{\centering\arraybackslash} m{1cm} }
\newcolumntype{B}{ >{\centering\arraybackslash} m{4cm} }
\newcolumntype{C}{ >{\centering\arraybackslash} m{2cm} }
\begin{tabular}{|A|B|C|}
\hline
$n$ & $a_{n}$ & $\frac{k_{0}^{n}}{n!}a_{0}$ \\[2ex]
\hline
1 & $k_{0}a_{0}$ & $\frac{k_{0}^{1}}{1}a_{0}$ \\[2ex]
\hline
2 & $\frac{k_{0}}{2}a_{1}=\frac{k_{0}}{2}k_{0}a_{0}$
& $\frac{k_{0}^{2}}{2 \cdot 1}a_{0}$ \\[2ex]
\hline
3 & $\frac{k_{0}}{3}a_{2}=\frac{k_{0}}{3}\frac{k_{0}}{2}k_{0}a_{0}$
& $\frac{k_{0}^{3}}{3 \cdot 2 \cdot 1}a_{0}$ \\[2ex]
\hline
4 & $\frac{k_{0}}{4}a_{3}=\frac{k_{0}}{4}\frac{k_{0}}{3}
\frac{k_{0}}{2}k_{0}a_{0}$
& $\frac{k_{0}^{4}}{4 \cdot 3 \cdot 2 \cdot 1}a_{0}$ \\[2ex]
\hline
\end{tabular}
\end{table}



