[Next] [Prev] [Right] [Left] [Up] [Index] [Root]
Operations on Factorization Sequences

Operations on Factorization Sequences

The factorization of integers results in a factorization sequence, consisting of a sequence of pairs of prime and exponent. It is sometimes convenient to perform operations on such sequences without converting back to the integers they represent --- it would, for example, be very inefficient to factor the product of two integers that have both been factored already. In this section we briefly list the operations that are allowed on such sequences --- note that these factorization sequences are ordinary sequences of 2-tuples of integers, but the first of the pair should be a prime number, and the second a positive integer.

The difference of two factorization sequences is only permitted when the first integer represented is greater than the second integer represented. An error results from division when the quotient does not correspond to an integer.

s + t : SeqEnum, SeqEnum -> SeqEnum
s - t : SeqEnum, SeqEnum -> SeqEnum
s * t : SeqEnum, SeqEnum -> SeqEnum
s / t : SeqEnum, SeqEnum -> SeqEnum
s ^ k : SeqEnum, RngIntElt -> SeqEnum
Lcm(s, t) : SeqEnum, SeqEnum -> SeqEnum
Gcd(s, t) : SeqEnum, SeqEnum -> SeqEnum
IsOne(s) : SeqEnum -> BoolElt
IsOdd(s) : SeqEnum -> BoolElt
IsEven(s) : SeqEnum -> BoolElt
IsUnit(s) : SeqEnum -> BoolElt
IsPrime(s) : SeqEnum -> BoolElt
IsPrimePower(s) : SeqEnum -> BoolElt
[Next] [Prev] [Right] [Left] [Up] [Index] [Root]