#### D.12.3.20 pFactor

Procedure from library `crypto.lib` (see crypto_lib).

Usage:
  pFactor(n,B,P); n to be factorized, B a bound , P a list of primes

Return:
  a list of factors of n or n if no factor found

Note:
  Pollard's p-factorization
  creates the product k of powers of primes (bounded by B) from the list P with the idea that for a prime divisor p of n we have p-1|k, and then p divides gcd(a^k-1,n) for some random a

Example:

    LIB "crypto.lib";
    list L=primList(1000);
    pFactor(1241143,13,L);
    ==> 547
    bigint h=10;
    h=h^30+25;
    pFactor(h,20,L);
    ==> 325

User manual for Singular version 4-0-3, 2016, generated by texi2html.