Number of Divisors in LaTeX (d(n))
- LaTeX command
d(n)- Package
- No package needed: built into LaTeX
- Mode
- Text and math mode
Where it is used
Divisor-counting function: how many positive divisors n has.
d(n) = \sum_{d \mid n} 1, so d(12) = 6. For n = p_1^{a_1}\cdots p_k^{a_k}, the formula d(n) = (a_1+1)\cdots(a_k+1) shows it is multiplicative. Other common names are \tau(n) and \sigma_0(n), so check which one your reference uses. Dirichlet's divisor problem studies the average order, \sum_{n \le x} d(n) = x\ln x + (2\gamma - 1)x + O(\sqrt{x}). Watch out: the letter d is also the usual divisor variable inside such sums, so prefer \tau(n) when both would appear in one formula.
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\begin{document}
Number of Divisors: $d(n)$
\[ d(n) = \prod_{i=1}^{k} (a_i + 1) \]
\end{document}Related symbols
- Mobius Function
\mu(n) - Sum of Divisors
\sigma(n) - Fractional Part
\{x\} - Integer Part
[x] - Ceiling
\lceil x \rceil - Floor
\lfloor x \rfloor
Frequently asked questions
- How do I write Number of Divisors in LaTeX?
- Type d(n) in math mode, for example $d(n) = \prod_{i=1}^{k} (a_i + 1)$. It works in plain LaTeX without loading any package.
- Which package do I need for d(n)?
- None. d(n) is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
- Can I use d(n) in text mode, or only in math mode?
- Both. d(n) compiles in running text as well as inside $...$; in a formula keep it in math mode so it gets math fonts and spacing.
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