Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Without using the fact that 2803 is prime, Calculate $2^{1401} \pmod{2803}$

Usually I would do something like:

$1401 = 3\times467$
$\equiv(2^{467})^3 \pmod{2803}$

And try to simplify it down and use the mod to get it down to something I can punch in the calculator, but in this case $2^{467}$ does not help as it is still too large.

If I did $(2^{3})^{467}$ that also does not seem to help as I just end up with $8^{467}$ and is too large

What other techniques can I use here?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

Use exponentiation by squaring. It easily adapts to exponentiation with a modulus. You have the right idea by trying to factorize the exponent. All there is left to notice is that you do not need to factorize it, e.g., $1401 = 2 \cdot 700 + 1$ means you can compute $2^{700} \ (\text{mod} \ 2803)$, then square that and multiply by 2.

share|improve this answer
    
Ahh I understand, thanks heaps –  Arvin Sep 26 '12 at 1:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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