Section 9.5 Proofs and Reasons
ΒΆSubsection 9.5.1 Computing prime powers
ΒΆWith some effort above, you should have seen a pattern for Ο(pe). Let's prove this.Fact 9.5.1.
Proof.
What we want is the number of positive numbers (!) coprime to \(p^e\) and less than \(p^e\text{.}\)
The most important point is that any number which is not coprime to \(p^e\) must share a prime factor with it, which must be \(p\text{.}\) Likewise, any number divisible by \(p\) is not coprime to \(p^e\text{,}\) so this is a necessary and sufficient condition.
Now we just need to count these numbers. But all the numbers less than or equal to \(p^e\) which have a factor of \(p\) are just the multiples of \(p\text{,}\) which occur every \(p\)th element. Since \(p^e\) itself is the \(p^{e-1}\)th such multiple, there are exactly \(p^{e-1}\) such integers not coprime to \(p^e\text{.}\)
Subtract; there are
elements which are coprime.
Subsection 9.5.2 Multiplicativity
ΒΆThe most interesting proof is that of the following factβ1βWe use a standard proof such as in [C.2.4] or [C.2.1]; it is also possible to use Fact 9.5.4 and Proposition 23.4.11 as in [C.2.13] or [C.5.1], but for this particular function this strategy seems more illuminating. about Ο applied to certain products. Later (Definition 18.1.2) we will see this has proved that Ο is multiplicative.Fact 9.5.2.
If gcd(m,n)=1, then Ο(mn)=Ο(m)β Ο(n).
Proof.
Take the integers from 1 to \(mn\) and arrange them in an array like so β \(n\) rows, \(m\) columns:
Notice that only some of the columns contain elements of \(U_m\text{,}\) namely, the columns with \(km+\ell\) where \(\gcd(\ell,m)=1\text{.}\) The others necessarily share nontrivial factors with \(m\text{,}\) so we focus on the \(\phi(m)\) columns like this where all elements are coprime to \(m\text{.}\)
Now within each such column, I claim there are all possible classes in \(\mathbb{Z}_n\text{.}\) Why?
Suppose that two elements of the \(\ell\) column are the same equivalence class. Then \(km+\ell\equiv k'm+\ell\) (mod \(n\)).
In that case we cancel \(\ell\) to get \(km\equiv k'm\text{,}\) and we can also cancel \(m\text{,}\) since we already know it is coprime to \(n\text{.}\) That leads to \(k\equiv k'\text{.}\)
In particular, the each class is only represented once in each column.
That means that each relevant column has exactly \(\phi(n)\) elements in it which are coprime to \(n\) (though which rows these elements are in will depend upon the column). In total we have \(\phi(m)\phi(n)\) of them!
Example 9.5.3.
It can be easier to see with an example, say n=15. Try the following interact if you are online. The elements that are units modulo mn are marked with exclamation points.
xxxxxxxxxx
def _(m=(5,[2..10]),n=(3,[2..10])):
T = [['$[%s]$'%i for i in [1..m]]]
for k in range(n):
t = []
for i in [1+k*m..m+k*m]:
if gcd(i,m*n)==1:
t.append('$%s$ !'%i)
else:
t.append('$%s$'%i)
T.append(t)
pretty_print(html(table(T, header_row=True, frame=True)))
Warning! If you pick an m and n which aren't coprime, you'll see how the exclamation points don't come in the right amounts or the right places for the proof.
Again, since there are Ο(m) columns with Ο(n) elements in them, all coprime to both m and n, that means there are Ο(m)Ο(n) elements coprime to mn, which proves what we wanted.
Subsection 9.5.3 Addition Formula
ΒΆIf you were diligent in your exploration, you will have discovered thatFact 9.5.4.
Proof.
In order to show this, we will take the set \(\{1,2,3,\ldots,n\}\) and partition it into subsets of numbers that each have the same \(\gcd\) with \(n\text{.}\) If we can show there are \(\phi(d)\) numbers having each possible \(\gcd\text{,}\) then that totals up to \(n\text{.}\)
Indeed, the only possibilities for greatest common divisor with \(n\) are the \(k\) various divisors \(\{d_i\}_{i=1}^k\) of \(n\text{,}\) so that each subset corresponds to one of these divisors. Our subsets then look like
Let's look at these sets more carefully. Each one consists of numbers sharing divisor \(d_i\) with \(n\text{.}\) So, if we wanted to, we could divide all the numbers in the \(i\)th set
by their common factor \(d_i\text{.}\)
That new set will be the set of positive numbers \(b\leq \frac{n}{d_i}\) also coprime to \(\frac{n}{d_i}\text{.}\) So the size of the subset of numbers having gcd \(d_i\) with \(n\) is the same as count of these \(b\) coprime to \(\frac{n}{d_i}\text{.}\)
More precisely, if we look at all the original subsets in question, they have the same sizes as the following sets, indexed starting at \(1\) instead of \(0\) for convenience:
The old sets were all disjoint, so even though these new sets \(\{b\in\mathbb{Z}\mid 1\leq b\leq n/d_i,\; \gcd(b,n/d_i)=1\}\) themselves are different (and possible not disjoint), their sizes (or cardinalities) are the same as before. So
But the set of numbers \(\frac{n}{d_i}\) for all divisors \(d_i\) of \(n\) is also the set of all divisors of \(n\text{,}\) so we can rewrite the sum as desired!