Number of multiples of p less than $p^k$ for p prime

102 Views Asked by At

I am trying to understand this proof: Prove that $\varphi(p^k)=p^k-p^{k-1}$ for prime $p$

At some point it is stated that the number of multiples of p in range $[1,p^k)$ is $p^{k-1}$.
I am struggling to get why. I tried this:
The multiples of p are : $$p, 2p, .., (p-1)p, p^2, 2p^2, .., (p-1)p^2, .., p^{k-1}, 2p^{k-1}, .., (p-1)p^{k-1}$$

Now I can think in terms of powers of p : Each power $p^i$ contributes $p-1$ mutliples : $$p^i, 2p^i, .., (p-1)p^i$$

And we have $k-1$ distinct powers so $(k-1)\times (p-1)$ multiples of p in total. Of course that's really different from the actual result. I cannot see what I am missing here.

2

There are 2 best solutions below

1
On BEST ANSWER

Anything less than or equal to $p^{k-1}$ can be multiplied by $p$ and not go over $p^k.$

So there's exactly $p^{k-1}$ non-totatives.

Subtract those out to get $p^k-p^{k-1}$ totatives.

1
On

Your powers-based counting only counts those numbers that are "pure" powers of $p$ – those numbers that when written in base $p$ have only one nonzero digit. Your counting omits numbers like $p+p^2$.


Ellipses can also deceive you. Did you notice when writing $$p, 2p, .., (p-1)p, p^2, 2p^2, .., (p-1)p^2, .., p^{k-1}, 2p^{k-1}, .., (p-1)p^{k-1}$$ that the separation between, say, $p^2$ and $2p^2$ is greater than $p$? This means there are more multiples of $p$ in between them.