<s>[INST] 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}$.
 [/INST] 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$.
</s>