Find what values of $n$ give $\varphi(n) = 10$ 
For what values of $n$ do we get $\varphi(n) = 10$?

Here, $\varphi$ is the Euler Totient Function. Now, just by looking at it, I can see that this happens when $n = 11$. Also, my friend told me that it happens when $n = 22$, but both of these are lucky guesses, or educated guesses. I haven't actually worked it out, and I don't know if there are any more.
How would I go about answering this question?
 A: Suppose $\varphi(n)=10$.  If $p \mid n$ is prime then $p-1$ divides $10$.  Thus $p$ is one of $2,3,11$.
If $3 \mid n$, it does so with multiplicity $1$.  But then there would exist $m \in \mathbb{N}$ such that $\varphi(m)=5$, and this quickly leads to a contradiction (e.g. note that such values are always even).
Thus $n$ fits the form $2^a\cdot 11^b$, and we claim that $b=1$.  If $b>1$ we have $11 \mid \varphi(n)$, a contradiction.  As well, $b=0$ gives $\varphi(n)$ a power of $2$.  Thus $n=2^a \cdot 11$, and it's easy to see from here that $n=11,22$ are the only solutions.
A: The second is not a lucky guess. If $n$ is odd, then $\varphi(2n)=\varphi(2)\varphi(n)=\varphi(n)$.
There is clearly only one prime $n$ such that $\varphi(n)=10$. And it has the automatic companion $22$. To search for other non-primes, recall that $\varphi$ is multiplicative, meaning that if $a$ and $b$ are relatively prime, we have $\varphi(ab)=\varphi(a)\varphi(b)$.
Let us look at the possibilities $\varphi(a)=2$, $\varphi(b)=5$. The equation $\varphi(b)=5$ has no solutions, since by symmetry $\varphi(n)$ is even if $n\gt 2$. 
Remark: Consider $n=2k$ where $k$ is odd. If $k=1$, the equation $\varphi(n)=n$ has the solutions $3$, $6$, and $4$.
If $k\gt 1$, and $2k+1$ is not prime, then we cannot find an $x$ such that $\varphi(a)=2k$. If $2k+1$ is prime, the equation $\varphi(x)=2k$ has precisely two solutions, $2k+1$ and $4k+2$. The argument is basically the same as in the case $k=5$ above. 
A: If a number $n$ has prime factorization $p_1^{x_1} p_2^{x_2} p_3^{x_3} \cdots $, then the following formula holds:
$$
\varphi(n) = \left( p_1^{x_1} - p_1^{x_1 - 1}\right)\left( p_2^{x_2} - p_2^{x_2 - 1}\right) \left( p_3^{x_3} - p_3^{x_3 - 1}\right) \cdots
$$
A: the general method will be demonstrated for 12.  
The factors of 12 are 2*2*3.  this is the product of totients of the prime powers (p-1)p^q.  So we divide this up into eg products to 12 that are numbers of this form.
 1*12    1,2 * 13      13, 26
 1*2*6   1,2 *3* 7     21, 42
 2*6     4 * 7, 9      28, 36

Since 3 can not be the totient of a prime power, the factorisation of 12=3*4 is not considered.
The case for 10involves 11 and 2 having totient products of 10 and 1, which leads directly to 11 and 22.
