Set \(n=1\). Then
\(\displaystyle\sum_{i=1}^1(3i-1)=3(1)-1=2\)
\(\dfrac{1(3(1)+1)}2=\dfrac42=2\)
Both sides match, so the statement holds for this case.
Assume it holds for \(n=k\). Then
\(\displaystyle\sum_{i=1}^{k+1}(3i-1)=\sum_{i=1}^k(3i-1)+3(k+1)-1\)
\(=\dfrac{k(3k+1)}2+3(k+1)-1\)
\(=\dfrac{k(3k+1)}2+\dfrac{2(3k+2)}2\)
\(=\dfrac{3k^2+7k+4}2\)
\(=\dfrac{(k+1)(3k+4)}2\)
\(=\dfrac{(k+1)(3(k+1)+1)}2\)
so that the statement also holds for \(n=k+1\), thus proving the statement by induction.