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 نظرية الأعداد →

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 poweredاكتب LaTeX باستخدام الذكاء الاصطناعي

أفضل محرر LaTeX بالذكاء الاصطناعي، بديل Overleaf

يساعد Octree الباحثين من أكثر من 15 جامعة على كتابة أوراق البحث بشكل أسرع باستخدام الذكاء الاصطناعي

  • أنشئ رسوم TikZ جميلة باستخدام الذكاء الاصطناعي
  • ارفع صورة وحولها إلى LaTeX بسلاسة
  • احصل على مساعدة فورية في كتابة وتنسيق أوراق البحث