Find all number $n\in \mathbb N$ such that $\varphi (n)=8$

40 Views Asked by At

$n\in \mathbb N$ such that $\varphi (n)=8$

I know for formula $\varphi (n)=n\prod\limits_{p|n}(1-\frac{1}{p})$ where p is prime number.

I choose $p=2$ and with formula I get that $n=16$, so it is ok, then I choose $p=2,3$ and using formula I get $n=24$, then $p=2,3,5$ and I get $n=30$ and that is ok, but if I choose $p=2,3,5,7$ then I can not get a number such that $\varphi (n)=8$ and I try other number and the result is the same, so is it ok that only number $n=16, n=24, n=30,$ or I need to write on other way?