1. ## Modular Exponentiation Calculator

I've received more requests for this calculator, so it is now ready, complete with a quiz generator and shortcut commands. It solves modular exponentiations in the form $x^n mod p$

Modular Exponentiation Calculator

2. Enhancement Update: I have also added the method of Successive Squaring to this lesson as well.

If you enter your $x^n \mod p$ statement in the search engine, the program will prompt you by asking how you wish to solve it, using modular exponentiation or successive squaring.

3. Originally Posted by mathceleb
Enhancement Update: I have also added the method of Successive Squaring to this lesson as well.

If you enter your $x^n \mod p$ statement in the search engine, the program will prompt you by asking how you wish to solve it, using modular exponentiation or successive squaring.
I'm afraid there is a problem:
"13 goes into 103^(673) a total of 7 times" (This came up in the problem $103^{673} \text{ mod 13}$.) It said the answer is 12 mod 13. I didn't check to see if this is right.

-Dan

Heh. I guess I was giving it a work out. I didn't realize that 673 is a prime number.

4. topsquark,

Is it incorrect? Modular Exponentiation comes up with the same answer. Let me know if I went wrong somewhere.

Also, if the exponent is not prime, do I need to take a different route? I ask because I changed the Chinese Remainder Theorem lesson to do the pairwise coprime test recently.

5. Originally Posted by mathceleb
topsquark,

Is it incorrect? Modular Exponentiation comes up with the same answer. Let me know if I went wrong somewhere.

Also, if the exponent is not prime, do I need to take a different route? I ask because I changed the Chinese Remainder Theorem lesson to do the pairwise coprime test recently.
To be honest I really don't know much about how you would put this into an algorithm. If I used Fermat's little correctly then the answer is indeed 12. Even so, the line of text that came out needs some work.

Keep up the good work. Your website looks fantastic.

-Dan

6. I think I may have pinned something down. It is taking "103^673 mod 13" and doing it all right. But I put in "103^(673) mod 13" and it seems to be having some kind of problem. Last night it gave a correct answer (12), but there was a line of text (see my first post in this thread) that was wrong. Today it is giving me an incorrect answer, 1. It doesn't seem to like the parenthesis.

-Dan

7. Originally Posted by topsquark
I think I may have pinned something down. It is taking "103^673 mod 13" and doing it all right. But I put in "103^(673) mod 13" and it seems to be having some kind of problem. Last night it gave a correct answer (12), but there was a line of text (see my first post in this thread) that was wrong. Today it is giving me an incorrect answer, 1. It doesn't seem to like the parenthesis.

-Dan
Great find!

I just fixed this right now so that both buttons can handle the parens (). I also updated the search engine shortcuts to handle this pattern of entry as well.

Thanks for finding that!