|
There are at least 2 ways to do this. First, you can find a pattern of the remainders.
The remainder for 3/7 is 3.
The remainder for 9/7 is 2.
The remainder for 27/7 is 6.
The remainder for 81/7 is 4.
The remainder for 243/7 is 5.
The remainder for 729/7 is 1.
The remainder for 2187/7 is 3. (start circulating every 6 ocurence)
So we can get the remainder of 1000 / 6 which is 4. The remainder for (3**1000) should be the same as the remainder of 81/7 which is 4.
Another way is to use modular. Since 3**3 = 27, the remainder for 27/7 can be either 6 or -1.
We can write down as 3**3 = -1 (modular 7). We times (3**333) for both sides then we have 3**999 = (-1)**333(modular 7) = -1(modular7).
We time both side by 3, then 3**1000 = (-3)(modular 7) = 4 (modular 7). The remainder is 4.
|