For which natural numbers are $\phi(n)=2$? I found this exercise in Beachy and Blair: Abstract algebra:

Find all natural numbers $n$ such that $\varphi(n)=2$, where $\varphi(n)$ means the totient function.

My try:
$\varphi(n)=2$ if $n=3,4,6$ and I think that no other numbers have this property. So assume $n>7$.
Case 1: $n$ is prime, since $\varphi(n)=n-1$ for primes, no numbers here will have the desired property
Case 2: $n$ is of the form $n=p^k$ for some prime $p$ and $k\in\mathbb{N}, k\ge 2$. By Eulers formula we get
$$
\varphi(n)=p^k-p^{k-1}
$$
which clearly is greater than $2$ since $n>7$.
Case 3: $n$ is the product of different primes and is squarefree (each prime comes up at most once in the prime factorisation of $n$). Assume 
$$
n=\prod_{i=1}^{m} p_i
$$
by Eulers formula
$$
\varphi(n)=n\prod_{p_i \ prime \ factor}\Big(1-\frac{1}{p_i}\Big)
$$
which gives
$$
\varphi(n)=p_1p_2\cdot\ldots\cdot p_m\Big(1-\frac{1}{p_1}\Big)\Big(1-\frac{1}{p_2}\Big)\cdot \ldots\cdot \Big(1-\frac{1}{p_m}\Big)
$$
rearranging and multiplying out gives
$$
(p_1-1)(p_2-1)\cdot\ldots\cdot (p_m-1)
$$
which once again has to be greater than $2$ since $n>7$.
Case 4: $n$ is a product of different primes and not squarefree. This is similar to Case 3 but we get some more factors in the product so if there were no integers in Case 3 there cannot be here eighter.
Now my first question is: Is my reasonning correct? Ususally when I have to divide the solution up into so many cases I feel that I haven't grasped the problem properly, but I couldn't come up with anything better.
Any suggestions?
Thank you in advance

For every prime $p\geq 4$ and ever natural number $k$ you have $p^k-p^{k-1}>2$.  Since $φ(ab)=φ(a)φ(b)$ if $(a,b)=1$ this means that if you have a prime number $p\geq4$ which $p|n$ then $φ(n)>2$. Therefore only $2$ and $3$ can divide $n$. But $2^{k_1}-2^{k_1-1}=2^{k_1-1}$ and $3^{k_2}-3^{k_2-1}\geq2$ for $k_2\geq2$ therefore $k_2$ can be only $0,1$ and $k_1$ can be only $0$,$1$,$2$. 
Now we check. 
If $k_1=0$ then only $3|n$ so $n=3$.
If $k_1=1$ then $2$ doesn't contribute to the function so again $k_2=1$ and now $n=6$.
Finally, if $k_1=2$ then $φ(4)=2$ and this forces $k_2=0$.
So you were right, $n$ can only be $3,4,6$.
