# Modular arithmetic

I have a simple question:

Why does 8^7 ≡ (-5)^7 (mod 13) and (25)^3 ≡ (-1)^3 (mod 13)?

In essence I want to show that 8^7 + 5^7 = 13^7, so that both sides of the equation ≡ 0 (mod 13) and therefore 8^7 ≡ (-5)^7 (mod 13).

I know that in a field of characteristic p>0, (x + y)^p = x^p + y^p, but the problem here is that the exponent is 7, not 13.

I also noticed that the equation works for odd integers but not even ones, i.e., 8^3 ≡ (-5)^3 (mod 13), 8^5 ≡ (-5)^5 (mod 13), etc.

Can anyone help me out here? Thanks.

Related Calculus and Beyond Homework Help News on Phys.org
Dick
Homework Helper
8 is equal to -5 mod 13. 25 is equal to -1 mod 13. Why is it surprising their powers would also be equal?

8 is equal to -5 mod 13. 25 is equal to -1 mod 13. Why is it surprising their powers would also be equal?
Oh wow thanks, that was totally not intuitive for me for some reason, but I see it much more clearly now. I just started doing modular arithmetic and never realized the same rules still apply. I guess "≡ (mod n)" is the same as "=" as far as any calculations are concerned?

Dick
Homework Helper
Oh wow thanks, that was totally not intuitive for me for some reason, but I see it much more clearly now. I just started doing modular arithmetic and never realized the same rules still apply. I guess "≡ (mod n)" is the same as "=" as far as any calculations are concerned?
Sure. If a=b mod n then a^k=b^k mod n for any k. That's not true for ANY operation. But it's true for the operations that respect mod arithmetic.

F13 is a field like R or C. When it comes to =, +, -, *, brackets, -1 it behaves exactly the same. There is no need to work with 'mod' or what so ever.

Running code below in http://magma.maths.usyd.edu.au/calc/ returns '0'.

Code:
F := FiniteField(13);

eight := F ! 8;
five:= F ! 5;
thirteen := F ! 13;

eight  ^7 + five ^7 - thirteen ^7;

Last edited:
Dick
Homework Helper
F13 is a field like R or C. When it comes to =, +, -, *, brackets, -1 it behaves exactly the same. There is no need to work with 'mod' or what so ever.

Running code below in http://magma.maths.usyd.edu.au/calc/ returns '0'.

Code:
F := FiniteField(13);

eight := F ! 8;
five:= F ! 5;
thirteen := F ! 13;

eight  ^7 + five ^7 - thirteen ^7;
That's a pretty strange response. Are you saying the only way to understand relations in Z_13 is to run magma?

That's a pretty strange response. Are you saying the only way to understand relations in Z_13 is to run magma?
no but if you are not in the mood to do manual computations you can use that website.