<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] What a mess.
First of I must point out that the is meaningless garbage.
$a \mod b + c \mod d$ is an abuse of notation.  The statement $a \mod b$ is not a number.  It is a class of equivalent numbers.  It may but add moduloly to other classes in the same modulo residue system but not to classes in others.
However I will take this (under objection) as an abuse of notation for the remainder function where, for example $28 \mod 5 = 3$ and not $-2$ or $7$ as we are taking one value between $0$ and $5$.  This is wrong and you should use a different notation for the remainder function that returns a number.  
But I'll use your abuse.
======
But note:  $(k+1)^4 \mod k^4 \equiv 4k^3 + 6k^2 + 4k + 1 \mod k^4$
So $(n+2)^4 \mod (n+1)^4 \equiv 4(n+1)^3 + 6(n+1)^2 + 4(n+1) + 1 \mod (n+1)^4$
And modulo $4$ we get:
$[ (n+2)^4 \mod (n+1)^4] \mod 4 \equiv [2(n+1)^2 + 1]\mod 4 \equiv 2n^2 + 4n + 3\equiv 2n^2 + 3 \mod 4$.
If $n \equiv 0,1,2,3 \mod 4$ we have $2n^2 + 3 \equiv 3,1,3,1 \mod 4$.
So $\sum\limits_{i= 2k+1}^{2k+2} ([ (n+2)^4 \mod (n+1)^4] \mod 4) = 1+ 3 = 4$.
So  $\sum\limits_{i= 1}^{2017} ([ (n+2)^4 \mod (n+1)^4] \mod 4)=\sum\limits_{i=1}^{2017}[3\text{ if i is odd}|1\text{ if i is even}]= \frac {2016}2*4 + 3 = 4035$.
</s>