Ok, I really need some help understanding this because either my brain isn't working at the moment or I'm breaking math and I have a striking suspicion that one of those is more likely.
Anyways, here's my process. WolframAlpha tells me there are 12 integer solutions, they are all $^+_-n$ so let's say there are 6 of them. They are as follows: $129, 147, 172, 196, 258, 294$
Ok, so here's how I attempted to solve it. $n$ looks like this ${\prod_{i=1}^kp_i^{\alpha_i}}$. And $\phi(n)=n\prod_{p\vert n}(1-\frac{1}{p})$. So I plug $n$ in and get an equation like this:
$\prod_{i=1}^k p_i^{\alpha_i-1}(p_i-1)=84$
Now, solving for $n$ SHOULD be equivalent to solving for $p_i, \alpha_i$, right?
So, I started going through possible values of $k$ and I'm interested in the case of $k=2$.
This means that $n$ has two prime factors, so it looks like $p_1^{\alpha_1}p_2^{\alpha_2}$, and the equation is:
$p_1^{\alpha_1-1}(p_1-1)p_2^{\alpha_2-1}(p_2-1)=84$
Ok. Here's my issue. Factoring $84$, we get $2\times2\times3\times7$
So I try to see a pattern. The first solution I came up with is $p_1=7, \alpha_1=2, p_2=2, \alpha_2=2$. Then I followed the same logic that led me to that solution but didn't find any more so I concluded that the other solutions must be as higher values of $k$. But then I factored $172$ and saw that it also had only two primes. It also fits the pattern. So I realized that I could get ones in that product as a result of $p^0$ and following that pattern, filling in the remaining factors, I found the $129$ solution.
No more, the next one must be at $k=3$. NOPE. $147$ also factors into only 2 primes. So now I'm really at a miss. Is there a more effective way to iterate over all of these combinations?