I want to show that the only solution of $$\varphi(n)+n=\sigma(n)$$ for a positive integer $n$ is $n=2$.

What I worked out is that we must have $$\varphi(n)>\frac{n}{2}$$

To show this assume $n$ is composite and its prime factors are $$p_1,\cdots,p_k$$ Then, the numbers $$1,\frac{n}{p_1},\cdots ,\frac{n}{p_k}$$ are distinct divisors from $n$ not equal to $n$ and the sum of those divisors is larger than the number of positive integers $m\in [1,n]$ not coprime to $n$, since every such $m$ is a multiple of one of the prime factors $p_i$ of $n$, the number of multiples of this $p_i$ is $\frac{n}{p_i}$

So we get $$n-\varphi(n)<1+\frac{n}{p_1}+\cdots \frac{n}{p_k}\le \sigma(n)-n$$ and together with $\varphi(n)+n=\sigma(n)$ we easily can derive the claimed inequality. This implies that an even composite solution cannot exist because of $\varphi(n) \le \frac{n}{2}$ for even $n$, hence $2$ must be the only solution.

But how can I show that no odd solution $n$ exists ? I strongly conjecture this because in this case $n$ must be a perfect square (because $\sigma(n)$ must be odd, if $n>1$) , and no perfect square $n\le 10^{16}$ does the job.