gives a list of the integers that divide n.
Details and Options
- Divisors[n,GaussianIntegers->True] includes divisors that are Gaussian integers.
Examplesopen allclose all
For integer input, integer divisors are returned:
For Gaussian integer input, Gaussian divisors are produced:
Divisors threads element‐wise over list arguments:
Find all perfect numbers less than 10000:
Representation of 25 as sum of two squares:
PowersRepresentations generates an ordered representation:
Number of representations of a number as a sum of four squares:
Computation by SquaresR:
Properties & Relations (4)
This counts the number of divisors:
In general, DivisorSigma[d,n]==∑k|nkd:
Similarly, EulerPhi[n]==n∏p|n(1-1/p) where p is prime:
Possible Issues (1)
Divisors gives all divisors except for multiplication by units; that is, they lie in the first quadrant:
Wolfram Research (1988), Divisors, Wolfram Language function, https://reference.wolfram.com/language/ref/Divisors.html.
Wolfram Language. 1988. "Divisors." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Divisors.html.
Wolfram Language. (1988). Divisors. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Divisors.html