EDIT: Show that for any positive integers $b$ and $n$, there is an integer $k$ such that $1\le k\le5$ and $5\mid b+2^nk$
I came across this problem while trying to understand the answer to the following question: For every positive number $n$, there exists a $n$ digit number having all odd digits and divisible by $5^n$
I tried plugging in values of $b$ and $n$, and indeed there is always a $k$ that makes $b+2^nk$ divisible by 5. So far, I know that if I let:
$k\equiv -3^nb\pmod5$.
then I get $6^nb\equiv b\pmod5$. I also know that $6^n\equiv n\pmod5$. How to get to $5\mid b+2^nk$ from there?
$\gcd(2,5) = 1$ so $2^n \not \equiv 0 \mod 5$. but $2^n\equiv m \mod 5$ for some distinct $1,2,3,4$ (all numbers that are no multiples of $5$ are.)
Now $5$ is prime so the non-zero value of $\mathbb Z_5$ is a field under modulo addition and mulitiplication. That is to so for any value $m\not \equiv 0 \mod 5$ we can find an value, we'll denote as $m^{-1}$ where $m*m^{-1} \equiv 1 \mod 5$.
Specifically if $m\equiv 1,2,3,4 \mod 5$ then $m^{-1}\equiv 1,3,2,4 \mod 5$ respectively.
So for $b \equiv 0,1,2,3,4 \mod 5$ then there is $(-b) \equiv 0,4,3,2,1 \mod 5$ so that $b + (-b) \equiv 0 \mod 5$.
So we have $2^n \equiv m \not \equiv 0 \mod 5$. That there is a $m^{-1}$ so the $m*m^{-1} \equiv 1 \mod 5$ and we know there is an $-n$ so that $b + (-b) \equiv 0 \mod 5$.
So just let $k \equiv (-b)*m^{-1} \mod 5$.
That's all there is to it.
$b + 2^n*k \equiv b + m*k \equiv b + m*m^{-1}(-b) \equiv b - b \equiv 0 \mod 5$.
Remains to argue $k$ is unique.
that's the beauty of fields. $b + m*k = 0$ has a unique solution $k = -b*m^{-1}$.