Solutions to phi(n)=18

Find all solutions to  
\[\phi (n)=18\]
, where  
\[\phi (n)\]
  counts all the integers up to and including  
\[n\]
  which are prime relative to  
\[n\]
.
\[\begin{equation} \begin{aligned} &= \phi (p_1^{k_1}p_2^{k_2}...p_r^{k_r}) \\ &= (p_1-1)p_1^{k_1-1}(p_2-1)p_2^{k_2-1}...(p_r-1)p_r^{k_r-1} \\ &= 18=1 \times 18=2 \times 3^2 =1 \times 2 \times 3^2\end{aligned} \end{equation}\]

\[\phi (p)=(p-1)=18 \rightarrow n=p=19\]

\[\phi (2p)=(2-1) \times (p-1) \rightarrow n=2p=38\]

\[\phi (p^3)=2 \times 3^2 \rightarrow p=3 \rightarrow n=3^3=27\]
.
\[\phi (2p^3)=(2-1)p \times p^2 \rightarrow p=3 \rightarrow n=2 \times 3^3=54\]
.