Find all $n$ such that $\sigma(n)=12$ Let $ \sigma (n) = \sum_{k|n}^{}{k} $. I need to solve $\sigma(n)=12$.
Probably the following might be of use: if $n={p_1}^{a_1}{p_2}^{a_2}...{p_s}^{a_s}$ then $\sigma(n)=\frac{{p_1}^{a_1+1}-1}{p_1-1}\frac{{p_2}^{a_2+1}-1}{p_2-1}...\frac{{p_s}^{a_s+1}-1}{p_s-1}$.
 A: If RHS $=12,$ as $1+p+p^2=7$ or $\ge 1+3+3^3=13,n$ must be square-free
So, $\sigma(n)=\prod(1+p_i)$ where $p_i$s are distinct prime divisors $(\ge2)$ of $n$
Also, $\sigma(n)\ge 1+n \ \ \ \ (1)$
The equality occurs if $n$ is prime i.e, here $n+1=12\implies n=11$ which is prime.
$(1)\implies n\le 11$
So, other the values of $n$ must be non-prime & square-free
As $2\le n\le 11,$ the values can be $6,10$
$\sigma(6)=\sigma(2\cdot3)=(1+2)(1+3)=12$
$\sigma(10)=\sigma(2\cdot5)=(1+2)(1+5)=18$

Alternatively,
As $n$ is square-free, the values of $1+p_i$s are $3,4,6,12$ as $\ge2$
If $1+p_1=3,1+p_2=4\implies n=p_1\cdot p_2=2\cdot 3=6$
If $1+p_1=6,1+p_2=2\implies p_2=1<2$ so this case does not arise
If $1+p_1=12, n=p_1=11$
A: Note that
$$
\begin{align}
\sigma (1) &= 1\\
\sigma (2) &= 1+2 = 3\\
\sigma (3) &= 1+3 = 4\\
\sigma (4) &= 1+2+4 = 7\\
\sigma (5) &= 1+5 = 6\\
\sigma (6) &= 1+2+3+6 = 12\\
\sigma (7) &= 1+7 = 8\\
\sigma (8) &= 1+2+4+8 = 15\\
\sigma (9) &= 1+3+9 = 13\\
\sigma (10) &= 1+2+5+10 = 18\\
\sigma (11) &= 12
\end{align}
$$
so the only solutions are $n = 6$ and $n = 11$.
