Sum of Divisors in LaTeX (\sigma(n))
- LaTeX command
\sigma(n)- Package
- No package needed: built into LaTeX
- Mode
- Math mode only
Where it is used
Sum-of-divisors function: the total of all positive divisors of n.
\sigma(n) = \sum_{d \mid n} d, so \sigma(6) = 1 + 2 + 3 + 6 = 12. A number is perfect exactly when \sigma(n) = 2n, and the general form \sigma_k(n) = \sum_{d \mid n} d^k includes the divisor count as \sigma_0. The function is multiplicative, with \sigma(p^k) = \frac{p^{k+1}-1}{p-1} for prime powers, so it can be computed from a factorization. Lowercase \sigma also means standard deviation, so a short remark helps in interdisciplinary work. Capital \Sigma is unrelated here.
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\begin{document}
Sum of Divisors: $\sigma(n)$
\[ \sigma(n) = \sum_{d \mid n} d \]
\end{document}Related symbols
- Mobius Function
\mu(n) - Fractional Part
\{x\} - Number of Divisors
d(n) - Integer Part
[x] - Ceiling
\lceil x \rceil - Floor
\lfloor x \rfloor
Frequently asked questions
- How do I write Sum of Divisors in LaTeX?
- Type \sigma(n) in math mode, for example $\sigma(n) = \sum_{d \mid n} d$. It works in plain LaTeX without loading any package.
- Which package do I need for \sigma(n)?
- None. \sigma(n) is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
- Can I use \sigma(n) in text mode, or only in math mode?
- Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\sigma(n)$ in running text.
Math poweredTulis LaTeX menggunakan AI
Editor LaTeX AI Terbaik, Alternatif Overleaf
Octree membantu penyelidik dari 15+ universiti menulis kertas penyelidikan dengan lebih cepat menggunakan AI
- Jana diagram TikZ yang cantik menggunakan AI
- Muat naik imej dan tukar ke LaTeX dengan lancar
- Dapatkan bantuan segera untuk menulis dan memformat kertas penyelidikan