I'm trying to prove by induction that $n^4+2n^3+n^2$ is divisible by 4.
I know that P(1) it's true. Then $ n=k, P(k):k^4+2k^3+k^2=4w$ it's true by the hypothesis of induction. When I tried to prove $n=k+1, P(k+1):(k+1)^4+(k+1)^3+(k+1)^2 = 4t$,
$$k^4+4k^3+6k^2+4k+1+2k^3+6k^2+6k+2+k^2+2k+1 = 4t.$$ $$(k^4+2k^3+k^2)+4k^3+6k^2+4k+1+6k^2+6k+2+2k+1 = 4t.$$
Can I replace $(k^4+2k^3+k^2)$ of the previous expression by $4w$ and then continue the proof? Is this correct? Thanks.
That method will work fine, but you can simplify it by noting that $ f(n) = n^2(n+1)^2$ therefore $\,n,$ or $n+1$ is even, so $4$ divides its square, so also $f(n)$ (provable directly or by induction if need be).