TITLE: Let $\phi$ be Euler's totient function, find all $n$ such that $\phi(n) = \frac{1}{3} n$.
QUESTION [5 upvotes]: Let $\phi$ be Euler's function, find all $n$ such that $\phi(n) = \frac{1}{3} n$.
Now while yes I've seen this proof asked before, I'm looking for a specific approach using this theorem.
That is if $n = \prod p^c$, then $\phi(n) = n\prod_{p \mid n} (1 - \frac{1}{p})$.
Not really sure how to continue here. Consider the largest prime divisor of $n$?

REPLY [2 votes]: Yes, focus on the largest prime.

If the distinct prime factors of $n$, in ascending order, are $p_1,...,p_k$, then since
$$\prod_{i=1}^k \left(1-\frac{1}{p_i}\right)=\prod_{i=1}^k \frac{p_i-1}{p_i}$$
it's clear that the numerator of the expanded product will not be a multiple of $p_k$.

But the denominator of the expanded product is a multiple of $p_k$, hence the factor $p_k$ of the denominator will survive the reduction to lowest terms.

By hypothesis, the reduction to lowest terms yields the fraction ${\large{\frac{1}{3}}}$, hence we must have $p_k=3$.

It follows that $n=(2^a)(3^b)$, where $a$ is a nonnegative integer, and $b$ is a positive integer. 

But if $a=0$, then $\phi(n) = {\large{\frac{2}{3}}}n$, hence we must have $a > 0$.

Finally, if $n=(2^a)(3^b)$, where $a,b$ are positive integers, it's easily verified that $\phi(n) = {\large{\frac{1}{3}}}n$.