I wish to prove
An integer is prime iff $\phi(n) | n-1$ and $n+1|\sigma (n)$ where $\phi$ is Euler's totient function and $\sigma(n)$ is the sum of the positive divisors of n.
I can show from a previous exercise that $\phi(n)|n-1$ implies n is square free.
I also know that $\sigma$ is multiplicative so $\sigma (n)$ is the product of $1+p_i$ for the prime factors of n So $\sigma (n) = n+1+S$ where $S$ is a bunch of extra terms which are divisible by $n+1$ since $n+1|n+1$ and $n+1|\sigma(n)$ so $n+1|\sigma (n)-(n+1)$ or $n+1|S$
I suspect that I need to show $n+1|S$ only if n is prime but am not sure how to do so. Or maybe I'm going in the totally wrong direction?
The other part of the proof is trivial since $\phi(p)=p-1$ and $\sigma (p)=p+1$ for any prime $p$ almost directly from the definitions of these functions.