So I was given a pretty easy problem

Calculate where is prime.

Which I can solve with what I have read online:

* Given if , then

Then it's pretty easy:

and since , then

But the problem is, in class we haven't proved * ,so we can't use it. Pretty much all we know about is that it is the number of positive integers wich are less than m and relatively prime to m. AND .

I'm just wondering how I would go about doing this?

Thanks

EDIT:

After some thought and more reading I came to this:

CASE 1 : if p != 2

Case 2:

Am I correct in my reasoning?