# Homework Help: When is x^n congruent to x^m (mod 3) for all x in Z^+?

1. Sep 7, 2016

### freakfog

(mentor note: moved here from another forum hence no template)

Hello, I need some help. For which $m,n \in \mathbb{Z^+}$ is $x^n \equiv x^m \space \text{(mod 3)}$ for all $x \in \mathbb{Z^+}$? I have no clue how to solve this. According to the answer, $n - m$ is an even integer. Anyone who can point me in the right direction? Thanks.

Last edited by a moderator: Sep 7, 2016
2. Sep 7, 2016

### Staff: Mentor

There are just three relevant cases for x, check them individually and you should get the right answer.

3. Sep 7, 2016

### RUber

A quick simplification is to note:
$x^m \mod 3 \equiv (x \mod 3)^m \mod 3.$