Totient Function $\varphi{(x)}=24$ I'm trying to solve for all $x$.  I'm thinking I'd like to take advantage of the fact that $\varphi$ is multiplicative if the factors of a number are coprime.  So let $x=ab, (a,b)=1$.  This is not the only possible case?  Perhaps $x=abc, (a,b)=(a,c)=(b,c)=1$...
$$\varphi{(x)}=24=12\cdot 2=8\cdot 3=6\cdot 4=\varphi{(a)}\varphi{(b)}$$
It can't be $8\cdot 3$ since $\varphi{(n)}$ is odd only for $n=1,2$.  So now the problem is reduced to finding $$\varphi{(a)}=12, \varphi{(b)}=2$$ or $$\varphi{(a)}=6,\varphi{(b)}=4$$
For the first set, I know that the only values of $b$ that satisfy this are $3,4,6$.  Now I need to find $a$ such that $\varphi{(a)}=12$ with $(a,6)=1$.  I know $13$ is prime, so $\varphi{(13)}=12,$.  Since $(13,6)=1$, I found my first match: So $x=78$ works. 
$\mathbf{EDIT}_2$  
I was thinking about it, and I could also do $a=13, b=4,$ and $a=13, b=3$, so I just found two more.  $x=52, 39$
But for the remaining values, I have to do the same analysis for $\varphi{(a)}=12$ that I did with 24 and this seems time consuming.  Is there some property I'm missing?  Using the canonical factorization of $x$ is too difficult since there are many combinations of primes to enter into 
$$\varphi{(x)}=x\prod_p{\left(1-\frac1{p}\right)}$$
$\mathbf{EDIT}_1$
I did use the canonical factorization with guess and check to obtain another.  So I just said let's try $p_1=2, p_2=3$. Then
$$\varphi{(x)}=x\left(1-\frac1{2}\right)\left(1-\frac1{3}\right)=\frac{x}{3}=24 \Rightarrow x=72$$
This is going to work since $72=2^3\cdot 3^2$.  Indeed,
$$\varphi{(72)}=\varphi{(9)}\varphi{(8)}=3(3-1)\cdot 4(2-1)=3\cdot 2\cdot 4=24$$
 A: If a prime $p$ is such that $p\mid x$, then $(p-1)\mid 24$, so that $p$ must be one of $2$, $3$, $5$, $7$, or $13$. Of these, $5$, $7$, and $13$ can only appear to the first power, since otherwise some positive power of these primes would divide $24$. By similar arguments, $2$ must appear to a power not greater than $3$, and $3$ to a power not greater than $2$. It's not too hard to test the resulting set of possibilities. (There are ten such numbers).
EDIT in response to OP comment: It's possible to whittle the set down further. For example, there can be no more than three primes in the factorization of $x$, for if there were, the factorization would include at least three of $3$, $5$, $7$, and $13$, so $x$ would be divisible by at least $(3-1)(5-1)(7-1) = 48$, which is impossible. Similar considerations show that if $13$ is a factor, then the other factor(s) must be either $2$ or $3$.
A: As a preliminary exercise, show:


*

*$\phi(n)=1$ implies $n\in\{1,2\}$

*$\phi(n)=2$ implies $n\in\{3,4,6\}$

*$\phi(n)=4$ implies $n\in\{5,8,10,12\}$


For any prime $p\mid n$ we have $p-1\mid \phi(n)$, so for $\phi(n)=24$ the only candidate prime divisors are $2,3,5,7,13$ (because the divisors of $24$ are $1,2,3,4,6,8,12,24$). 
If $p^2\mid n$, then additionally $p\mid \phi(n)$, which may happen only with $p=2$ or $p=3$.
On the other hand if the odd prime $q\mid \phi(n)$, then $q^2\mid n$ or there exists a $p\mid n$ with $q\mid p-1$; hence from $3\mid 24$ we conclude $9\mid n$ or $7\mid n$ or $13\mid n$.
This leaves just a few things to try: 


*

*If $13\mid n$, then $\phi(\frac n{13})=2$, so $n\in\{39,52,78\}$

*If $7\mid n$ then $\phi(\frac n{7})=4$, so $n\in\{35,56,70,84\}$

*If $3^a\mid n$ with $a\ge2$, then $a=2$ because $9\nmid 24$, and $\phi(\frac n9)=4$, so $n\in\{45,72,90\}$ (if you think that $9\cdot 12$ should appear, note that $3\nmid \frac n9$)

