galois.factors

galois.factors(n)[source]

Returns the positive factors of the integer \(n\).

Parameters

n (int) – An integer to be factored.

Returns

Sorted array of factors of \(n\).

Return type

list

Examples

In [1]: galois.factors(120)
Out[1]: [1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 24, 30, 40, 60, 120]