TITLE: Let n be a positive integer such that $2\varphi(n)=n-1$. Prove that $n$ is not divisible by $3$
QUESTION [5 upvotes]: $\varphi(n)$ is the Euler-Totient function
So what I've got currently is that $\varphi(n)=(n-1)/2$. The result of the Euler-Totient function is always a positive integer and is even, so $(n-1)/2$ must be both of those things as well. So, that would mean that $(n-1)$ must be even, and it must be divisible by $4$, as $(n-1)/2$ must also be even. So I guess I'm left with $n \equiv 0 \;(\bmod\; 3)$ and $n-1 \equiv 0 \;(\bmod\; 4)$. Assuming I'm even right about this, I'm trying to solve these 2 equivalence relations and trying to find a contradiction, which I don't how to do.

REPLY [3 votes]: For some integer $k \ge 1$ and distinct primes $p_i$ for $1 \le i \le k$, the prime factorization of $n$ is
$$n = \prod_{i=1}^{k}p_i^{e_i}, \; e_i \ge 1 \tag{1}\label{eq1A}$$
One form of Euler's totient function then gives
$$\varphi(n) = \prod_{i=1}^{k}p_i^{e_i - 1}(p_i - 1) \tag{2}\label{eq2A}$$
The required relation
$$2\varphi(n) = n - 1 \tag{3}\label{eq3A}$$
gives $\gcd(\varphi(n), n ) = 1$, so comparing \eqref{eq1A} and \eqref{eq2A} shows $p_i \not\mid \varphi(n)$ which means $e_i = 1 \; \forall \; 1 \le i \le k$. Thus, $n$ must be a square-free integer.
Assume $3 \mid n$, and WLOG let $p_1 = 3$. Thus, \eqref{eq3A} then becomes
$$2(3 - 1)\left(\prod_{i=2}^{k}(p_i - 1)\right) = 3\left(\prod_{i=2}^{k}p_i\right) - 1 \tag{4}\label{eq4A}$$
None of the $p_i$ for $2 \le i \le k$ primes are $3$, since they are all distinct, so they must be congruent to either $1$ or $2$ modulo $3$. If any of them are congruent to $1$ modulo $3$, then the left side would have a factor of $3$, i.e., it's congruent to $0 \pmod{3}$. If, instead, all of the $p_i$ for $2 \le i \le k$ are congruent to $2 \pmod{3}$, then $p_i - 1 \equiv 1 \pmod{3}$, and the left side would then be congruent to $2(3 - 1) = 4 \equiv 1 \pmod{3}$. In either case, this contradicts the right side being congruent to $2 \pmod{3}$.
This means the original assumption, i.e., $3 \mid n$, must be incorrect, thus proving that $n$ is not divisible by $3$.