Consider the sequence you discovered.
You found that
\(1^1\;\mod2 = 1\;or \;-1\\ 2^2\;\mod3=+1\\ 3^3\;\mod4=-1\\ 4^4\;\mod5=+1\)
NOTE: If a number (mod n) = -1 Then the number divided by n will have a raimainder of n-1
If you want me to discuss this more I can.
So it looks like
\(n^n\mod(n+1)=+1 \text{ when n is even}\\ n^n\mod(n+1)=-1 \text{ when n is odd}\\\)
So can I prove that his is always the case??
\(n\mod(n+1)=-1\\ so\\ n^n\mod(n+1)\equiv (-1)^{n+1} \)
-1 raised to an even power will be +1
-1 raised to an odd power will be -1
so
\(\frac{n^n}{n+1}\quad\text{has a remainder of +1 when n is an even positive integer}\\ and\\ \frac{n^n}{n+1}\quad\text{has a remainder of n when n is an odd positive integer}\\ \text{which means}\\ \frac{2019^{2019}}{2020}\quad\text{has a remainder of 2019 }\\\)
.