Let n=p1α1⋅…⋅pkαk be the prime factorization of n with p1<…<pk, so that p(n)=pk and σ(n)=(1+p1+⋯+p1α1)…(1+pk+⋯+pkαk). Hence
pk−1=nσ(n)=∏i=1k(1+pi1+⋯+piαi1)<∏i=1k1−pi11=∏i=1k(1+pi−11)≤∏i=1k(1+i1)=k+1,
that is, pk−1<k+1, which is impossible for k≥3, because in this case pk−1≥2k−2≥k+1. Then k≤2 and pk<k+2≤4, which implies pk≤3.
If k=1 then n=pα and σ(n)=1+p+⋯+pα, and in this case n∤σ(n), which is not possible. Thus k=2, and n=2α3β with α,β>0. If α>1 or β>1,
nσ(n)>(1+21)(1+31)=2.
Therefore α=β=1 and the only answer is n=6.
Comment: There are other ways to deal with the case n=2α3β. For instance, we have 2α+23β=(2α+1−1)(3β+1−1). Since 2α+1−1 is not divisible by 2, and 3β+1−1 is not divisible by 3, we have
{2α+1−1=3β3β+1−1=2α+2⟺{2α+1−1=3β3⋅(2α+1−1)−1=2⋅2α+1⟺{2α+1=43β=3,
and n=2α3β=6.