What is the remainder when $2^{2018}$ is divided by $43$?
I know that this has something to do with one of Fermat's Theorems. I am almost at a loss as to how to solve for the remainder or why it has anything to do with Fermat's Theorem
Here is Fermat's Theorem:
If $p$ is prime and $a$ is not divisible by $p$, then $$a^{p-1}\equiv 1( \text{mod }p)$$ If $a$ is divisible by $p$, then $$a^{p}\equiv a(\text{mod } p) $$