2
$\begingroup$

I was wondering how to go about finding $\varphi(2^n)$.

I know that $\varphi(2)=1$ and that $φ(mn) = φ(m)φ(n)$, but in this case having $\varphi(2^n) = \varphi(2\times2\times2\cdots\times 2)$ does not work since we end up with $1$ and this is not the answer.

  • 0
    here every odd natural number less than $2^n$ is prime to it and no even number is so....2017-02-04
  • 2
    $\phi(pq) = \phi(p)\phi(q)$ if and only if $p$ and $q$ are relatively prime (i.e: $\gcd(p, q) = 1$).2017-02-04

3 Answers 3

6

Note that the totient function is only multiplicative for relatively prime $m,n$: We have $\phi(nm) = \phi(m)\phi(n)$ if $\gcd(n,m) = 1$.

If $p$ is any prime and $n\in \mathbf N$, note that any $d < p^n$ having common divisors with $p^n$ must be divisible by $p$, that is be any of the numbers $0,p,2p, \ldots, p^n$. There are $p^{n-1}$ of them. Hence $$ \phi(p^n) = p^n - p^{n-1} = p^{n-1}(p-1) $$ coprime with $p^n$.

Therefore $\phi(2^n) = 2^{n-1}$.

2

Take a prime $p$. By definition

$$\phi(p^n)=\#\{q\leq p^n,\,\,\gcd(p^n,q)=1\}$$

Let's count. Between $1$ and $p^n$ we have $p^{n-1}$ numbers who have $p$ in their prime factorisation and so

$$\phi(p^n)=p^n-p^{n-1}=p^{n-1}(p-1)$$

For $p=2$ we get $\phi(2^n)=2^{n-1}$

1

It's perhaps better to go back to the definition of the totient function - how many natural numbers less than $n$ are coprime to $n$?

In the case of any $n=2^k$, clearly every odd number is coprime to $n$, and every even number is not, so $\phi(n) =\frac{2^k}{2} = 2^{k-1}$