If $n$ is a positive integer, find the remainder of the following number divided by $100$: $$S = \sum_{i=0}^{99} (n+i)^6 + 2^{2^{2558}} + 1$$
I've wrote a program using logarithmic exponentiation and big integers to find that $2^{2^{2558}} \equiv 16 \pmod{100}$. But I don't know what can I do with $\sum_{i=0}^{99} (n+i)^6$. Can you help me continue the problem, please? Thanks!
First note that $$k^6+(k+1)^6+(k+2)^6+(k+3)^6\cong 2\quad\text{mod 4}$$ since$$k^6+(k+1)^6+(k+2)^6+(k+3)^6\cong1^6+2^6+3^6+4^6\cong2\qquad \text{mod 4}$$since we have $25$ of such 4-tuple terms we can say that $$\sum_{i=0}^{99}(n+i)^6\cong 2\quad\text{mod 4}$$also divisible by 25 since $$\sum_{i=0}^{24}(n+i)^6\cong\sum_{i=0}^{24}i^6=\sum_{i=1}^{24}i^6\text{mod 25}$$and since $$i^6\cong(25-i)^6\text{mod 25}$$ it suffices to show that $$\sum_{i=1}^{12}i^6\text{mod 25}$$or $$1^6+2^6+3^6+4^6+6^6+7^6+8^6+9^6+11^6+12^6\cong 0\text{mod 25}$$but this is true since $$25|1+7^6\\25|3^6+4^6\\25|2^6+11^6\\25|6^6+8^6\\25|9^6+12^6$$which completes our proof since $$\sum_{i=0}^{99}(n+i)^6=\sum_{i=0}^{24}(n+i)^6+\sum_{i=25}^{49}(n+i)^6+\sum_{i=50}^{74}(n+i)^6+\sum_{i=75}^{99}(n+i)^6\cong 0\quad\text{mod 25}$$
From the other side, $2^{2^{2558}}$ is divisible by 4 and we have $$2^7\cong3\quad\text{mod 25}\\2^{21}\cong27\cong 2\quad\text{mod 25}\\2^{20}\cong1\quad\text{mod 25}$$to find the remainder of division of $2^{2^{2558}}$ note that $$2^2\cong -1\quad\text{mod 5}$$here we obtain$$2^{2556}\cong 1\quad\text{mod 5}$$therefore $$2^{2558}\cong 4\quad\text{mod 20}$$finally by defining ${2^{2558}}=20u+4$ we conclude that $$2^{2^{2558}}=2^{20u+4}=16\cdot (2^20)^u\cong 16\cong -9\quad\text{mod 25}$$since $2^{2^{2558}}$ is also divisible by 4 we finally get$$2^{2^{2558}}=100k+16$$which means that $$\Large S\cong-33\quad\text{mod 100}$$