Sum of Divisors in LaTeX (\sigma(n))

σ(n)\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.

σ(n)=∑d∣nd\sigma(n) = \sum_{d \mid n} d
\documentclass{article}
\begin{document}
Sum of Divisors: $\sigma(n)$

\[ \sigma(n) = \sum_{d \mid n} d \]
\end{document}

Related symbols

All Teori Bilangan →

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 peneliti dari 15+ universitas menulis makalah penelitian lebih cepat menggunakan AI

  • Hasilkan diagram TikZ yang indah menggunakan AI
  • Unggah gambar dan konversi ke LaTeX dengan mulus
  • Dapatkan bantuan instan untuk menulis dan memformat makalah penelitian