Order of operations in modular arithmetic with exponents

  • Context: Undergrad 
  • Thread starter Thread starter johnnyICON
  • Start date Start date
  • Tags Tags
    Arithmetic
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
8 replies · 4K views
johnnyICON
Messages
79
Reaction score
0
[tex]99999^{99} + 1[/tex]
As [tex]99999 \equiv[/tex]24[tex](mod \25)[/tex]
Can I say then:
[tex]99999^{99} + 1 \equiv[/tex]24[tex]^{99} + 1(mod \25)[/tex], or is it
[tex]99999^{99} + 1 \equiv[/tex]24[tex]^{99}(mod \25) + 1[/tex],
or are these two the same things?
 
Physics news on Phys.org
johnnyICON said:
[tex]99999^{99} + 1 \equiv[/tex]24[tex]^{99} + 1(mod \25)[/tex]

This one is standard. People would probably understand the second, but the usual format is to write the mod at the end.
 
oh ok, i was just wondering if the two were the same. I was uncertain if by moving the +1 before the mod5 it would change the meaning. Awesome, well then that makes this question a lot easier now. Thanks :D
 
Another quick question.

Are the following two congruencies the same?
1. [tex]24^{99} + 1 \equiv 0 \mod \25[/tex]
2. [tex]24^{99} + 1 \mod \25 \equiv 0 \mod \25[/tex]

I am trying to show that a number is divisible by 25, and I found that 25 can be written in terms expressed in equation #1. And I found that number that I am trying to divide by 25 can be expressed in terms expressed in equation #2.

I thought I finished the proof but now that I am looking at it, I am unsure about this one thing.
 
When you write 25 don't write it \25 or the 5 just shows up, write it normally, e.g:

[tex]24^{99} + 1 \equiv 0 \mod 25[/tex]

and:

[tex]24^{99} + 1 \mod 25 \equiv 0 \mod 25[/tex]

There two statements are the same, I think you miss the point though. Something like:

[tex]24^{99} + 1 \mod 37 \equiv 0 \mod 25[/tex]

Woule make not really make that much sense, so amoung other reasons there is no reasons to write the mod twice.
 
Okay. Because I was trying to show that equation #2 and #1 are equivalent.

So they are right? LOL sorry, I'm just very uncertain about myself.
 
johnnyICON said:
Okay. Because I was trying to show that equation #2 and #1 are equivalent.
Well, people tend to view congruence defined as a ternary relation:

[tex]x \equiv y \mod n \overset{def}{\Longleftrightarrow} n|x-y.[/tex]

Sometimes one omits the modulo part, but it is still understood that we're dealing with modulo arithmetic by using the equivalence sign [tex]\equiv[/tex], instead of an equality sign. Another way of stating a congruence [tex]x \equiv y \mod n[/tex] is by saying that [tex]x[/tex] and [tex]y[/tex] belong to the same residue class (look this up on mathworld.wolfram.com). That is

[tex]x \equiv y \mod n \Leftrightarrow [x]_n = [y]_n[/tex]

So, your equation 2. states (with the missing 2 from 25) that

[tex][[25^{99}+1]_{25}]_{25} = [0]_{25}[/tex]
 
Remember Matt Grime's post in your other thread. You are trying to show that
24^99 +1 = 0 mod 25.
but 24^99 +1 = (-1)^25 +1 = -1+1 = 0 mod 25, since 24=-1 mod 25 and since -1 raised to an odd power is -1. Q.E.D.
 
Yea, that's exactly how I did it Ramsey :D Sorry, I should of concluded this thread by mentioning that. Thanks for another helpful response though. I appreciate it.