1. ## Prime numbers problem

If anyone could explain how this is done, it would be very much appreciated!

Fermat’s Little Theorem states that if a is an integer with gcd(a,p) = 1, where p is a prime number, then:
a^(p-1) ≡ 1 mod p

Define e_p(a) to be the smallest number n>0 such that a^n ≡ 1 mod p. Compute e_p(a) for the prime p = 5 and 1≤a≤p-1

2. Originally Posted by clockingly
If anyone could explain how this is done, it would be very much appreciated!

Fermat’s Little Theorem states that if a is an integer with gcd(a,p) = 1, where p is a prime number, then:
a^(p-1) ≡ 1 mod p

Define e_p(a) to be the smallest number n>0 such that a^n ≡ 1 mod p. Compute e_p(a) for the prime p = 5 and 1≤a≤p-1
There are only a limited number of possibilities here.

Obviously 1 is a rather trivial example of this since $1^n = 1$ for any n.

We can look at 2 and get that $2^4 \equiv 1 \text{ mod 5}$

etc.
$3^4 \equiv 1 \text{ mod 5}$
and
$4^2 \equiv 1 \text{ mod 5}$

So I guess we have that
$e_p(1) = 1$
$e_p(2) = 4$
$e_p(3) = 4$
$e_p(4) = 2$

Is this what you were looking for?

-Dan