Math Help - Find the maximum value...

1. Find the maximum value...

Find the maximum value of the positive integer n for which (n^2) + 2 divides f(n) = (n+1)((n^4)+2n) + 3((n^3)+57)

2. Originally Posted by MATNTRNG
Find the maximum value of the positive integer n for which (n^2) + 2 divides f(n) = (n+1)((n^4)+2n) + 3((n^3)+57)
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.