quadraticSieve {bigIntegerAlgos}R Documentation

Prime Factorization with the Quadratic Sieve

Description

Get the prime factorization of a number, n, using the Quadratic Sieve.

Usage

quadraticSieve(n)

Arguments

n

An integer, numeric, string value, or an element of class bigz.

Details

First, trial division is carried out to remove small prime numbers, then a modified version of Pollard's rho algorithm that is constrained is called to quickly remove further prime numbers. Next, we check to make sure that we are not passing a perfect power to the main quadratic sieve algorithm. After removing any perfect powers, we finally call the quadratic sieve with multiple polynomials in a recursive fashion until we have completely factored our number.

Value

Vector of class bigz

Author(s)

Joseph Wood

References

See Also

factorize

Examples

mySemiPrime <- prod(nextprime(urand.bigz(2, 40, 17)))
quadraticSieve(mySemiPrime)

[Package bigIntegerAlgos version 0.1.2 Index]