What is the remainder of the division $\frac{2^{82}}{7}$? I tried this in the following way
step 1:- (2)^2*41 /7
step 2:- (2)^2*41 / 2^2 + 3
step 3:- let us assume x = 2^2
step 4:-  then x^41 / x+3
step 5:- Using Remainder theorem, x = -3
F(-3) = (-3)41

Step 6:- As the last digits of 3 repeats for every four power
          last digit of 3^41 = last digit of 3^1
so, (-3)^1 = -3

step 7:-  Divisor is added to get a positive number
   -3+7 = 4 

The answer which I calculated is 4, but the correct answer was 2.  Could any help me out?? I am trying to solve this through remainder theorem.
 A: You're seeking to find $$2^{82}\mod 7$$
Since $7$ is prime and $7\not\mid 2$, we can use Fermat's little theorem that tells us that $$2^6\equiv 1 \mod 7$$
(this actually is not that hard to see, $64-1=63=7\times 9$)
But $82=13\times 6+4$. So we obtain this is $$2^4\mod 7=2$$
A: $2^3\equiv 1 (\mbox{mod } 7) $. So you have $2^{82}=2\cdot(2^3)^{27}\equiv 2\cdot 1^{27}\equiv 2 (\mbox{mod } 7)$. So the answer is $2$.
A: I guess that what you call the remainder theorem says the following:

Theorem. Let $f(x)$ be a polynomial with integer coefficients, and let $a$ be an integer. When we are carrying out the polynomial long division
$$
\frac{f(x)}{x-a}
$$
the constant remainder term is equal to $f(a)$. In other words, there exists a polynomial $g(x)$ with integer coefficients such that
$$
f(x)=g(x)(x-a)+f(a).
$$

In view of this I would do the following. Let $x=8$, so $7=x-1$. Then 
$$
2^{82}=2^{3\cdot27+1}=2\cdot(2^3)^{27}=2x^{27}.
$$
The remainder theorem tells us that the remainder of the division $\dfrac{2x^{27}}{x-1}$ (evaluating at $x=1$) is thus
$2\cdot1^{27}=2$.

I agree with others that this is easier with Little Fermat and its cousins, but it sounds like you haven't covered those yet?
