# Modular arithmetic: Problem 1

### Solution

First, square [8] repeatedly, mod 11:

• $$[8]^2 = [64] = [9]$$
• $$[8]^4 = ([8]^2)^2 = [9]^2 = [81] = [4]$$
• $$[8]^8 = ([8]^4)^2 = [4]^2 = [16] = [5]$$
• $$[8]^16 = ([8]^8)^2 = [5]^2 = [25] = [3]$$

Now, notice that 21 = 16 + 4 + 1. So then we compute:

$$[8]^{21} = [8]^{16} \cdot [8]^4 \cdot [8] = [3][4][8] = [12][8] = [1][8] = [8]$$

### Self-check

Did you get the right number for your answer? Did you remember to enclose it in square brackets, as the instructions asked?

Did you show an amount of work similar to the above?

Are all of your intermediate values small? The absolute value of an intermediate value in computation mod 11 should never be larger than 121, and it should only rarely get that large.

### Alternate solution

Notice that $$[8]^{21} = ([8]^{7})^3$$

$$[8]^7 = ([8]^2)^3\cdot [8]$$

$$[8]^2 = [64] = [9]$$

So $$[8]^7 = ([8]^2)^3\cdot [8] = [9][9][9][8] = [81][72] = [4][6] = [24] = [2]$$

So $$[8]^{21} = ([8]^{7})^3 = [2]^3 = [8]$$

This solutions splits up $$[8]^{21}$$ in an ad hoc way. This can work, and is an acceptable answer to the question as asked. However, repeated squaring is a better approach, because a consistent method of attack makes errors less likely. This is especially true under exam conditions.