Results 1 to 7 of 7

Math Help - Modular Exponentiation Calculator

  1. #1
    Senior Member
    Joined
    Feb 2008
    From
    Berkeley, Illinois
    Posts
    364

    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
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Senior Member
    Joined
    Feb 2008
    From
    Berkeley, Illinois
    Posts
    364
    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.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Forum Admin topsquark's Avatar
    Joined
    Jan 2006
    From
    Wellsville, NY
    Posts
    10,212
    Thanks
    419
    Awards
    1
    Quote Originally Posted by mathceleb View Post
    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.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Senior Member
    Joined
    Feb 2008
    From
    Berkeley, Illinois
    Posts
    364
    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.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Forum Admin topsquark's Avatar
    Joined
    Jan 2006
    From
    Wellsville, NY
    Posts
    10,212
    Thanks
    419
    Awards
    1
    Quote Originally Posted by mathceleb View Post
    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
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Forum Admin topsquark's Avatar
    Joined
    Jan 2006
    From
    Wellsville, NY
    Posts
    10,212
    Thanks
    419
    Awards
    1
    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
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Senior Member
    Joined
    Feb 2008
    From
    Berkeley, Illinois
    Posts
    364
    Quote Originally Posted by topsquark View Post
    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!
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. modular exponentiation example
    Posted in the Discrete Math Forum
    Replies: 1
    Last Post: March 3rd 2012, 01:03 PM
  2. Modular Exponentiation
    Posted in the Number Theory Forum
    Replies: 2
    Last Post: November 13th 2010, 02:54 PM
  3. Modular Exponentiation
    Posted in the Advanced Algebra Forum
    Replies: 1
    Last Post: September 13th 2010, 06:31 PM
  4. Modular exponentiation
    Posted in the Number Theory Forum
    Replies: 0
    Last Post: March 9th 2009, 12:08 AM
  5. Modular Exponentiation
    Posted in the Number Theory Forum
    Replies: 1
    Last Post: August 27th 2008, 05:31 PM

Search Tags


/mathhelpforum @mathhelpforum