TOPICS
Search

Divides


If, for n and d integers, the ratio n/d is itself an integer, then d is said to divide n. This relationship is written d|n, read "d divides n." In this case, n is also said to be divisible by d and d is called a divisor of n.

Clearly, 1|n and n|n. By convention, n|0 for every n except 0 (Hardy and Wright 1979, p. 1).

The function a|b can be implemented in the Wolfram Language as

  Divides[a_, b_] := Mod[b, a] == 0

The function Divisible[n, d] returns True if an integer n is divisible by an integer d.


See also

Divide, Divisible, Divisor

Explore with Wolfram|Alpha

References

Hardy, G. H. and Wright, E. M. An Introduction to the Theory of Numbers, 5th ed. Oxford, England: Clarendon Press, 1979.

Referenced on Wolfram|Alpha

Divides

Cite this as:

Weisstein, Eric W. "Divides." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/Divides.html

Subject classifications