What is the smallest value that the sum of the digits of the number $3n^2+n+1,$ $n\in\mathbb{N}$ can take?