# Find the maximum value...

If $n^2+2$ divides $(n+1)(n^4+2n) + 3(n^3+57) = n^5+n^4+3n^3+2n^2+2n+171 = (n^2+2)(n^3+n^2+n) + 171,$ then $n^2+2$ must divide 171. The largest integer n with that property is n = 13.