IntegerMath.Divisors Method

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.0

Overload List

Divisors(Int32) Returns the divisors of an integer.
Divisors(Int64) Returns the divisors of an integer.

Divisors(Int32)

Returns the divisors of an integer.
C#
public static IEnumerable<int> Divisors(
	int n
)

Parameters

n  Int32
An integer.

Return Value

IEnumerable<Int32>
A sequence of the divisors of n.

Remarks

The divisors may not be returned in increasing order. The first divisor is guaranteed to be 1, while the last divisor is guaranteed to be n.

Divisors(Int64)

Returns the divisors of an integer.
C#
public static IEnumerable<long> Divisors(
	long n
)

Parameters

n  Int64
An integer.

Return Value

IEnumerable<Int64>
A sequence of the divisors of n.

Remarks

The divisors may not be returned in increasing order. The first divisor is guaranteed to be 1, while the last divisor is guaranteed to be n.

See Also