# Quick questions about modular arithmetic

1. May 24, 2005

### johnnyICON

$$99999^{99} + 1$$
As $$99999 \equiv$$24$$(mod \25)$$
Can I say then:
$$99999^{99} + 1 \equiv$$24$$^{99} + 1(mod \25)$$, or is it
$$99999^{99} + 1 \equiv$$24$$^{99}(mod \25) + 1$$,
or are these two the same things?

2. May 24, 2005

### shmoe

This one is standard. People would probably understand the second, but the usual format is to write the mod at the end.

3. May 24, 2005

### johnnyICON

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

4. May 25, 2005

### johnnyICON

Another quick question.

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

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.

5. May 25, 2005

### Zurtex

When you write 25 don't write it \25 or the 5 just shows up, write it normally, e.g:

$$24^{99} + 1 \equiv 0 \mod 25$$

and:

$$24^{99} + 1 \mod 25 \equiv 0 \mod 25$$

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

$$24^{99} + 1 \mod 37 \equiv 0 \mod 25$$

Woule make not really make that much sense, so amoung other reasons there is no reasons to write the mod twice.

6. May 25, 2005

### johnnyICON

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.

7. May 25, 2005

### funkstar

Well, people tend to view congruence defined as a ternary relation:

$$x \equiv y \mod n \overset{def}{\Longleftrightarrow} n|x-y.$$

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

$$x \equiv y \mod n \Leftrightarrow [x]_n = [y]_n$$

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

$$[[25^{99}+1]_{25}]_{25} = [0]_{25}$$

8. May 26, 2005

### ramsey2879

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.

9. May 26, 2005

### johnnyICON

Yea, thats 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.