After simplifying $\frac{2^{2017}+1}{3\cdot 2^{2017}}$ to $\frac{n}{m}$ where $n$ and $m$ are coprime, find the remainder when $m+n$ is divided by $1000$.
Since the top is odd and the bottom is even, the only thing that can cancel is the $3$. Therefore, I'm looking for $2^{2017}+\frac{2^{2017}+1}{3}$ (mod $1000$). However, I don't know how to find this value. Could someone give me a hint?
Clearly $\gcd (2^{2017}+1,2^{2017}3)=3$ so $$3m+3n =2^{2017}3+(2^{2017}+1)=2 ^{2019}+1$$
So $$3(m+n)\equiv _8 1$$ so $$m+n\equiv _8 3$$ and since $\varphi(125)=100$ we have by Euler theorem $$3(m+n)\equiv _{125} 2^{19}+1 = 2^9\cdot 2^{10}+1 \equiv _{125}39$$ $$ \implies m+n \equiv_{125} 42\cdot 39 \equiv_{125} 13$$
Write $m+n = 8x+3$ then we have $$125\mid 8x-10\implies 125\mid 4x-5 $$
$$\implies 125\mid 4x+120 = 4(x+30)\implies 125\mid x+30$$ so $x = 125y-30$ and thus $$ m+n = 1000y-237$$
So the answer is $\boxed{763}$.