Let $\varphi$ be the Euler $\varphi$-function. We have for any $a\in\mathbb{Z}^+$:
$\varphi(p^a)=p^a-p^{a-1}$
It is clear that all the positive number of the form $np$ with $1\le n\le p^{a-1}$ are not relatively prime to $p^a$.
May I ask how to prove that all the rest of the positive number less than $p^a$, as the above formula indicates, are indeed relatively prime to $p^a$?
I've just written a trial proof:
So here I think I'm asking if there exists a positive integer $y$ such that
$y<p^a$ [given]
$y\neq np$ for any $1\le n\le p^{a-1}$ [given]
$y$ is not relatively prime to $p^a$ ($\implies$ there exists $q\in\mathbb{Z}^+$ with $q>1$ such that $q\mid y$ and $q\mid p^a$) [assumed]
If so, then there exists a prime $\alpha$ such that $\alpha\mid q$. Hence, there exists $m\in\mathbb{Z}^+$ such that $m\alpha =p^a$. Thus, $\alpha=p$ since $p$ is the only prime factor of $p^a$. Then $p\mid q$. Hence, $p\mid y$. We must have $y=np$ for some $1\le n\le p^{a-1}$ because $y<p^a$. By contradiction, such $y$ doesn't exist.
Could anyone verify my proof please?
Actually because the only prime divisor of $p^a$ is $p$ the only common prime divisor between $p^a$ and a number less than it can be $p$ so we just have to count all numbers less than $p^a$ which are divisible by $p$ and this number is clearly equal to $p^{a-1}$ so there are totally $p^{a-1}$ numbers less than $p^a$ that are not relatively prime to $p^a$ and therefore $p^a-p^{a-1}$ numbers that are relatively prime to $p^a$.