A function $f$ has the property that $f(3x-1)=x^2+x+1$ for all real numbers $x$.  What is $f(5)$?
$\mathrm{(A)}\ 7 \qquad \mathrm{(B)}\ 13 \qquad \mathrm{(C)}\ 31 \qquad \mathrm{(D)}\ 111 \qquad \mathrm{(E)}\ 211$
$3x-1 =5 \implies x= 2$
$f(3(2)-1) = 2^2+2+1=7 \implies (A)$