When is $\phi(n)=n$ true? For what values of n is $\phi(n)=n$ true? Just looking at tables of values it seems that $\phi(n)=n$ is true only for $n=0,1$ but I cannot come up with how to  prove this.
I realize that the value of $\phi(0)$ is not really well-defined (What is the Euler Totient of Zero?) but for the purpose of this question I'll assume it is.
 A: First, $\varphi(n)$  is defined only for $n\ge 1$. Second, if $n=\prod\limits_{i=1}^r p_i^{r_i}$  for primes $p_1,\dots,p_r$, we have:
$$\frac{\varphi(n)}n=\prod_{i=1}^r\Bigl(1-\frac1p_i\Bigr).$$
Thus, $\varphi(n)=n\iff\dfrac{\varphi(n)}n=1$ can be true if and only if $r=0$, i. e. $n=1$.
A: From the definition of $\phi(n)$ is the number of positive integers not exceeding $n$, that are relatively prime to $n$. Further, for $n>1$, we have $\gcd(n,n) = n$. Hence, for $n > 1$, we have $\phi(n) < n$. Hence, $n$ can be only $0$ or $1$.
A: yes what you said is true $\phi(n) = n$ if and only if $n=0,1$
Now actually $\phi(n) \leq n-1$ for all $n \geq 2$ and $\phi(n) = n-1$ only occurs when $n$ is prime at this case
A: Here you have another proof:
For $n=p_1^{\alpha_1}p_2^{\alpha_2}\dots p_k^{\alpha_k}$ with $p_i$ prime numbers, $\phi(n)=n(1-\frac{1}{p_1})(1-\frac{1}{p_2})\dots(1-\frac{1}{p_k}) < n$ as $0<1-\frac{1}{p_i}< 1\ \forall p_i$.
A: $\varphi(n)$ is the number of integers $k$, $1 \le k \le n$, relatively prime to $n$. This gives us immediately that $\varphi(n) \le n$ for all $n$.
But for $n \ge 2$, $n$ is not relatively prime to itself, so we have that $\varphi(n)$ is equivalent to the number of integers $k$, $1 \le k \le n-1$, relatively prime to $n$. Thus $\varphi(n) \le n-1$ for $n \ge 2$. In particular, the only solution to $\varphi(n) = n$ is $n = 1$. ($\varphi(0)$ is not usually defined.)
A: By definition, $\phi(n)<n$ for $n\ge 2$ since, $(n,n)=n$.
