\(a_n = n^2 + n\text{.}\) Here we know that we are looking for a quadratic because the second differences are constant. So \(a_n = an^2 + bn + c\text{.}\) Since \(a_0 = 0\text{,}\) we know \(c= 0\text{.}\) So just solve the system

\begin{equation*} \begin{aligned} 2 \amp = a + b\\ 6 \amp = 4a + 2b \end{aligned} \end{equation*}