Seemingly contradicting proof for Euler's Totient Function Euler's Totient function has the following property:
$$
\phi(p^\alpha) = p^\alpha - p^{\alpha - 1}
$$
for prime p and $ \alpha \geqslant 1 $
However the following proof demonstrates that$ \phi(n) = \frac{n}{2}$ iff $n = 2^k$ for some $ k \geqslant 1 $
Let $ n = 2^km$ where m is odd. Then $\phi(n) = 2^{k-1}\phi(m)$ which equals $\frac{n}{2}$ only if $\phi(m) = m$ that is $m = 1$ So $n = 2^k$
I have two questions, first of all, why does $\phi(n) = 2^{k-1}\phi(m)$? How is this conclusion reached in the proof?
And secondly why does this not contradict the property? Given that 2 is a prime, shouldn't the property dictate that $\phi(2^k) = 2^k - 2^{k-1}$
 A: If 
$$n=2^k\implies \frac n2=2^{k-1}=2^k-2^{k-1}\;\ldots$$
so indeed $\;\phi(n)=\cfrac n2\;$ yet no contradiction exists.
A: $ϕ(m) = m-1$ when m is a prime
the totient function handles products of 2 factors by splitting them up.
$ϕ(n) = ϕ(M*2^k) = $
        $ =ϕ(m)ϕ(2^k) $

Euler’s totient function is something called a homomorphism which is a function with the property that  ϕ(a*b) = ϕ(a)ϕ(b) so that’s why we can say this- If you’re asking why this part is true then we’d start talking about
it’s because ϕ(AB) calculates the number of units in something called a ring (think  integers mod 10) and it turns out that a if you split up a ring into a tuple of 2 coprime rings (integers mod 2, and integer mod 5) the set actually behaves exactly the same. We call that isomorphism, which is when 2 sets behave the exact same but we’ve named them different things. We name them different things sometimes because of the context we use them in. so the number of units in integers mod 10 is 4 :1,3,7,9 the units mod 2 are 1, and the units mod 5 are 1,2,3,4
In the definition for the function there’s currently a way to deal with prime powers
for inputs of prime powers the totient function puts out
$ϕ(p^n) = (p-1)p^(n-1)$ it’s short hand  since $2^k$ = 2*2*2*2… k times
so now we know that 
$ϕ(2^k)=(2-1)* 2^(k-1)$
2-1 is 1 so what we have is
$ϕ(2^k) = 1*2^(k-1)$
so
$=ϕ(m)ϕ(2^k) =ϕ(m)*(2^(k-1))$
