Factoring Lab

Receipts for factoring ideas: which work, which don’t, and how fast they stop working.

B6 · Methods that workWorks, and here’s how it scales

CFRAC: continued fractions before the sieve

The of √N hands out squares that are almost N. The method that factored F₇ in 1970 and led straight to the .

The idea

The of √N gives fractions A/B with A² − N·B² small: never more than 2√N. So A² ≡ ±Q (mod N) with a small Q. Most Q have a big prime factor and are useless; the few made only of small primes (smooth) are kept. Multiply some so every prime appears an even number of times, and you get X² ≡ Y² (mod N).

Watch it

Each row is one step of the expansion. A row is kept when Q is made only of the small primes in the factor base; the last line shows the dependency that splits N.

The test

All 60 numbers fall. The leftovers Q never exceed 2√N, and the share of them that is smooth lands close to what the smooth-number theory predicts, within the wide spread you would expect at this size.

Fig. B6.2Terms of the expansion CFRAC needed, against the size of N, next to the candidates the quadratic sieve needed

Measuring…