Integers with factorization information.
(new in 0.91.0)
If factors is given, it is a dict of type {prime:exponent} and the product of prime**exponent is equal to the integer. Otherwise, factorization is carried out in initialization.
A class method constructs a new FactoredInteger object from partial factorization information given as dict of type {prime:exponent}.
Return True if other divides self. other can be FactoredInteger object or int/long.
Divide by other. The other must divide self. other can be FactoredInteger object or int/long.
Return all divisors.
Return the proper divisors (divisors of n excluding 1 and n).
Return the list of primes that divides the number.
Return the largest integer whose square divides the number.
If an optional argument asfactored is true, then the result is also a FactoredInteger object. (default is False)
Return the largest divisor of the number which is squarefree.
If an optional argument asfactored is true, then the result is also a FactoredInteger object. (default is False)
Return a copy of the object.
operator | description |
* | multiplication (other operand can be an int) |
** | powering |
== | equal |
!= | not equal |
% | remainder (the result is an int) |
// | same as exact_division method |
str | string |
int, long | convert to Python integer |