<s>[INST] $\sum_{n=1}^{2017}\left(\left((n+2)^4\bmod{(n+1)^4}\right)\bmod{4}\right)$ 
What's
$$\sum_{n=1}^{2017}\left(\left((n+2)^4\bmod{(n+1)^4}\right)\bmod{4}\right)$$

What have I tried?
$$(n+2)^4=n^4+8n^3+24n^2+32n+16$$
$$(n+1)^4=n^4+4n^3+6n^2+4n+1$$
Remainder:
$$4n^3+18n^2+28n+15$$
mod:
$$2n^2-1\pmod{4}$$
I can compute $\sum x^2$ but I don't know what to do with $$\sum_{n=1}^{2017}\left(2n^2-1\mod{4}\right)$$
 [/INST] For odd $n$, $(n+1)^4$ is a multiple of $4$, so in that case $$(X\bmod(n+1)^4)\bmod 4 = X \bmod 4$$ and we just have to sum $(n+2)^4\bmod 4$. But $(n+2)^4$ is an odd square, and all odd squares are $1$ modulo $4$.
For even $n$ your calculation of $(n+2)^2 \bmod (n+1)^4 = 4n^3+18n^2+28n+15$ works as long as $(n+1)^4 < 2(n+1)^4$ which happens when $n>\frac{1}{\sqrt[4]2-1}-1 \approx 4.3$. So the cases $n=2,4$ need to be treated as special cases.
Otherwise you're summing (as you say) $2n^2-1$ modulo $4$. But since $n$ is now even, $2n^2$ will be a multiple of $4$, so it disappears and only the $-1$ is left.
So for $n\ge 4$ the $+1$ from an odd $n$ cancels out the $-1$ from the even $n$ next to it, and all that is left is
$$\sum_{n=1}^{3}\left(\left((n+2)^4\bmod{(n+1)^4}\right)\bmod{4}\right)$$
which can be done by hand easily.
</s>