I was trying to solve a problem where $\frac{n^2(n+1)^2}{4}$ has remainder $17$ when divided by $n+5$. So, I expressed it as $\frac{n^2(n+1)^2}{4} = (n+5) q + 17$. Then, multiplying four on both sides, you get $n^2(n+1)^2 = 4(n+5)q + 68$. Now, I understand that if I take this equation $\mod{n+5}$, we obtain $n^2(n+1)^2 \equiv 68 \pmod{n+5}$. However, there will be extraneous solutions since our quotient $q$ must be divisible by four. However, instead of taking our equation $\mod{n+5}$, what if we take it $\mod{4n+20}$? Then, there is no restriction on $q$, and thus (?) no extraneous solutions. Solving, we have
\begin{align*} n^2(n+1)^2 &\equiv 68 \pmod{4n + 20} \\ (4n)^2(4n+4)^2 &\equiv 68*4^2*4^2 \pmod{4n+20} \\ (-20)^2(-16)^2 &\equiv 17408 \pmod{4n+20} \\ \text{Then, dividing 4 on both }&\text{sides as well as $4n+20$ since $4 \mid 4n+20$} \\ 25600 &\equiv 4352 \pmod{n+5} \\ 21248 &\equiv 0 \pmod{n+5} \\ \Rightarrow n+5 &\mid 21248 \end{align*}
However, testing values of $n$ show that most are extraneous. What went wrong? What condition was implicitly placed that makes some of these values extraneous?