For an integer $n,$ let $f(n)$ be the remainder when $n^8 + n^{16}$ is divided by $5.$ Compute $f(0) + f(1) + f(2) + f(3) + f(4).$
We want to find the sum of f(0)+f(1)+f(2)+f(3)+f(4) where f(n) is the remainder of n^8+n^16 divided by 5
We start with 0 and get 0 so the remainder is 0
Then we plug in 1 to get 1+1 is 2 so the remainder is 2
For f(2) we know 2^8 is 256. 256 ends in a 6 so 2^16 which is (2^8)^2 ends in 6. 6+6=12 so 12/5 the remainder is 2
For f(3) we know 3^4 is 81 so the last diit of 3^8 is 1 then square 3^8 to get 3^16 and the last digit is also 1 so 1+1=2 so the remainder is also 2
For f(4) is the same as f(2) since it is bascically square all of f(2) so the remainder is still 2
Adding 0+2+2+2+2=8