[Tex/LaTex] How to get a good “divisible by” symbol

math-moderelation-symbolssymbols

In addition to the "divides" relation, denoted b | a, there is also a "divisible by" relation expressing the converse (a is divisible by b), often designated with three vertical dots.

Up until now, I've settled with

\mathrel{\vdots}

Example

But there are two problems with the symbol:

  • It is too high relative to the numbers
  • It is also somewhat too long

A search with Detexify and the Comprehensive LaTeX Symbol List doesn't reveal anything more suitable. How do I get a good looking "divisible by" symbol?

Best Answer

I've never seen that symbol. But here's how you can define it

\DeclareRobustCommand{\divby}{%
  \mathrel{\vbox{\baselineskip.65ex\lineskiplimit0pt\hbox{.}\hbox{.}\hbox{.}}}%
}

It's just an almost straightforward modification of \vdots.

enter image description here

In order that the symbol changes size when used in subscripts/superscripts, just enclosing the main part in \text will do.

\documentclass{article}
\usepackage{amsmath}

\DeclareRobustCommand{\divby}{%
  \mathrel{\text{\vbox{\baselineskip.65ex\lineskiplimit0pt\hbox{.}\hbox{.}\hbox{.}}}}%
}

\begin{document}

\[
a\divby b \qquad \sum_{k\divby n}a_k
\]

\end{document}

enter image description here