Xet \(n=3k\)
\(\left(3k\right)^2+3k+2\equiv2\left(mod3\right)\)
Xet \(n=3k+1\)
\(\left(3k+1\right)^2+3k+1+2\equiv4\equiv1\left(mod3\right)\)
Xet \(n=3k+2\)
\(\left(3k+2\right)^2+3k+2+2\equiv1+2+2\equiv2\left(mod3\right)\)
\(\Rightarrow n^2+n+2⋮̸3\)
\(\Rightarrow n^2+n+2⋮̸15\)