1

Find the remainder when $6^{1987}$ is divided by $37$.

Because 37 is prime we have: $6^{36}$ mod $37 = 1$. I tried to get a nice combination like: $1987 = 36 * 55 + 7$, so we would have $(6^{36})^{55}6^{7}=6^{1987}$. Then, I've taken mod $37$, which is: $6^{1987}$ mod $37=1^{55}(6^7$ mod $37)$. I need to find $6^7$ mod $37$. What can I do from here?

Of course, any other method (solution) for finding the remainder would be great.

Daniel C
  • 629

3 Answers3

2

$$6^2\equiv-1\pmod{37}$$ So $6^7\equiv (-1)^3\cdot 6\equiv 31\pmod{37}$

You could have utilized this from the start, since $6^2\equiv-1\implies 6^4\equiv1$. Thus, you could have written $1987=496\cdot 4+3$ and $$6^{1987}=(6^4)^{496}\cdot6^3\equiv 6^3\equiv 6^26\equiv-6\equiv31\pmod{37}$$

Tim Ratigan
  • 7,247
1

Hint $\rm\ mod\ n^2+1\!:\,\ \color{#c00}{n^2}\equiv -1 \ \Rightarrow\, n^{4k+3}\! = n(\color{#c00}{n^2})^{2k+1} \equiv - n.\ $ Yours is special case $\,\rm n=6.$

Bill Dubuque
  • 272,048
0

As $\displaystyle 6^2=36\equiv-1\pmod{37}$

$\displaystyle 6^{2n+1}=6\cdot(6^2)^n\equiv6\cdot(-1)^n\pmod{37}$

Here $\displaystyle2n+1=1987\iff n=993$