# Modular Arithmetic

1. Feb 9, 2008

### Coto

1. The problem statement, all variables and given/known data
Compute:
$$(a + b)^5$$
in Z_5 (Z mod 5).

2. Relevant equations
The end result is apparently:
$$(a^5 + b^5)$$

Intuition would tell me to exploit the properties of arithmetic in Z_n, however I don't see how I can reconcile this solution with just a normal expansion of (a+b)^5 (which seems to be allowed due to the def. of arithmetic for these classes.)

3. The attempt at a solution
Well, my best guess would be to show that the middle terms go to zero no matter what. But trying this with for example (a+b)^2 (which has the analagous sol'n) would mean that ab + ba = ab + ab = 0 (mod 5). However, choosing for example a = [2], and b = [2], shows that this would actually be [4]+[4] = [8] = [3], which clearly is not 0... so I'm at a loss.

or.. I could have read this question wrong.. or perhaps my world view of modular arithmetic is one big illusion. ugh.

2. Feb 9, 2008

### morphism

The 5 up there is important. (a+b)^2 doesn't need to be equal to a^2+b^2 mod 5. However, it is equal to that mod 2. In general, (a+b)^p = a^p+b^p mod any prime p.

3. Feb 9, 2008

### Coto

Gotcha. Thanks for the answer, it makes sense now.