3
$\begingroup$

I have been learning some applications to Fermat's Little theorem and I am currently solving the remainder of $40^{1999}$ divided by $7$ and would appreciate if anyone could confirm my answer of $5$.

$7$ is prime and $7\nmid 40$

So according to Fermat's Little Theorem

$40^{6} \equiv 1 \pmod{7}$

$1999/6 = 333\times 6 + 1 $

Therefore $(40^6)^{333}\times 40^1 \equiv 1^{333}\times 40 \pmod{7}$

$40^{1999} \equiv 40 \pmod{7}$

$40^{1999} \equiv 5 \pmod{7}$

The remainder of $40^{1999}$ divided by $7$ is $5$

$\endgroup$
  • 1
    $\begingroup$ This is correct. $\endgroup$ – lulu Jun 18 '17 at 9:48
  • 1
    $\begingroup$ You understand correctly. Good job. $\endgroup$ – fleablood Jun 18 '17 at 16:49
2
$\begingroup$

Your reasoning is correct, but you could have used from the start the fact that $40\equiv 5\pmod7$. It follows from this that $40^{1999}\equiv5^{1999}\pmod7$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.