factordb relaunch
factordb has been rebuilt on a new backend while keeping the same numbers, ids, and factor trees. Below is a summary of what is new and what changed. Existing links, ids, and the classic API keep working.
No submitted results are lost. When the old factordb is replaced, all factors added there are imported too, so every contribution carries over.
This version has replaced the old site. Feedback is still very welcome: if you run into a bug, a wrong result, or have a suggestion, I would genuinely appreciate hearing about it.
Contact: mail@factordb.com
The old database was converted, then checked and repaired pass by pass. Some of these passes are still running or waiting for machine time; this list is where they stand.
Done
- Migration to the new database scheme - every stored number converted, verified and re-indexed.
- New lookup hash computed for every number.
- Term checks - all stored expressions re-parsed and re-evaluated, digit counts confirmed.
- Divisibility checks over all composite-factor (CF) rows - every stored split re-multiplied against its number.
- CF splits normalized to coprime factors. A small tail could not be re-split automatically; those products are correct as stored.
- Dangling factor references repaired.
- Composites below 2^64 now carry their complete factorization instead of an opaque composite entry.
- Certificates re-compressed, re-typed by generating program, and the certificate leaderboards rebuilt from scratch.
- Aliquot sequence cache filled.
- Primality re-check of all probable primes (PRP).
- N-1 / N+1 factoring progress computed for every probable prime, with new Order options on the list of probable primes: most factored N-1, most factored N+1, the better of the two, or closest to a combined proof.
Partly done to be completed
- Import of the remaining factors from the old database - everything that was reported to the old site between the copy and the switch.
- Primality re-check of proven primes (P).
- Re-check of composites (C).
- Perfect-power check over composites and untested numbers.
In progress
- Adding algebraic factors to existing numbers (difference / sum of powers, Aurifeuillian): untested numbers and composites are done, the CF table is being processed; numbers up to 20,000 digits.
- Sequence cache prefill - every sequence type for starts up to 1,000,000. Aliquot is done, 10 of the other 141 types are complete, the rest follow one after another.
Always running
- Trial factoring (the comb scanner, levels 0-8) on every composite up to 200,000 digits. The P-1 / P+1 levels are paused for now.
- PRP tests of untested numbers up to 30,000 digits, and primality proofs for small probable primes, which are then promoted to proven.
- Certificate verification of uploaded primality certificates.
- Recovery of failed factorizations - numbers the scanner could not split are re-processed with ECM and re-enter the pipeline.
Planned
- Algebraic factors for numbers above 20,000 digits.
- Completion of the partial re-checks listed above.
- The entire backend was re-implemented in Rust as a JSON-RPC service; every page now talks only to that API, never to the database directly.
- The same numbers, ids, and factorizations as before, served faster and with lower load.
- Primality testing, small-factor scanning, and proof generation run as background workers inside the core, so results settle on their own over time.
- Probable-prime testing now uses Baillie-PSW (a strong Miller-Rabin base-2 test plus a strong Lucas test) - deterministic below 2^64 and with no known counterexample above it.
- Deterministic special-form proofs (Pocklington N-1, Morrison N+1, and combined BLS75) are computed exactly with GMP, replacing external pfgw runs.
- Primality certificates (Primo / gmp-ECPP) can be uploaded and are verified automatically; a verified certificate promotes a PRP to a proven prime.
- Numbers show live proof progress with per-method "Prove now" actions.
- A small-factor comb scanner (batch tree-GCD) continuously sweeps untested numbers for small factors.
- ECM factor statistics, each validated against the curve's group order, with a found-factors panel and a browsable list.
- An ECM group-order calculator (GMP-ECM + PARI) for primes up to 100 digits.
- Algebraic factorizations (difference / sum of powers, Aurifeuillian) are recognized and applied automatically.
- A full cofactor-product verification and a primality re-check over stored primes catch and repair legacy misclassifications from the old database.
- Stored expressions are canonicalized to their shortest self-contained form on lookup.
A composite with a special form can be factored with the special number field sieve: a polynomial with small coefficients makes the job far cheaper than GNFS on a number of the same size. factordb now finds these polynomials itself and hands them out ready to sieve.
Where to find it
- Number page: an open composite of 80 to 400 digits shows an "SNFS polynomial" panel when a polynomial exists that is expected to beat GNFS. It names the special form, lists the polynomials best first with difficulty and Murphy E, and states the effort as "about as much as GNFS on an n-digit number".
- Job files: every polynomial as a GGNFS / yafu job file, an msieve
.fbfile or a CADO-NFS.polyfile, with sieving parameters for its difficulty -/snfs.php?id=...&format=ggnfs|msieve|cado. - Command line and API:
fdb snfs <number>and the JSON-RPC methodsnfs_poly. These answer for any number and say so when it is prime, already has known factors, or when GNFS is the better choice.
Forms it recognizes
- Powers:
k*b^n±c,a^n±b^n,k*a^p±l*b^q, Leyland numbersx^y+y^x, Mersenne and Fermat numbers, repunits, near-repdigits, and sums of several powers of one base such as10^200+10^100+1. - Cyclotomic and Aurifeuillian parts: the primitive part of
a^n±b^ngets a polynomial of its own (halved in degree where possible), and so do the Aurifeuillian L and M halves - at half the difficulty of the number they divide. - Fibonacci and Lucas numbers
I(n),L(n), Pell numbers and the general Lucas sequencesH(m,n),U(n,p,q),V(n,p,q): any index including a prime one, primitive parts, the Aurifeuillian halves ofL(5n), and sums such as2*I(803)-1. - Smarandache numbers
S(m,n)in any base - the concatenation is a short sum of powers of the base. - Perrin numbers
Q(n)and 3-step Lucas numbersY(3,n)with an index divisible by 4 to 8. Their polynomials have large coefficients and only pay off for numbers of about 250 digits and more. - Cofactors: the form is read from the number's own expression or from the numbers it is
a known factor of, so the plain decimal cofactor of
2^n-1or of a Fibonacci number gets its polynomial too.
What you get
- Polynomials of degree 4 to 8 with a linear second polynomial. Each one is checked exactly: the common root modulo the number, and irreducibility.
- They are ranked by Murphy E for a sieve of the job's size, and a polynomial that loses to GNFS on the number is not offered.
- Example: the 276-digit cofactor of
I(1423)gets13x^6+48x^5+75x^4+60x^3+30x^2+6x+1at difficulty 297 - about as much work as GNFS on 196 digits.
No special form
- Factorials, multifactorials and primorials (
n!±c,n#±c), sums of factorials, Padovan, Narayana and Motzkin numbers have no form that gives a polynomial with small coefficients, and neither has a number that is known only as a decimal with no special form above it. - Such a number still has a polynomial - a GNFS one. It comes from a polynomial search for that particular number (msieve, CADO-NFS, yafu), not from its form, so factordb has none to hand out; the number field sieve works on it all the same, at the full GNFS cost for its size.
A probable prime can be proven with a Pocklington (N-1) or Morrison (N+1) test once one third of N-1 or N+1 is factored into proven primes. That figure used to be visible only on each number's own page. It is now kept for every probable prime, so the ones closest to a proof - the best targets for factoring N-1 or N+1 - can be found.
- Lists: for probable primes the list has an Order choice - most factored N-1, most factored N+1, the better of the two, or closest to a combined proof - with a size range and the percentages as columns: probable primes, most factored first.
- What is counted: trial division of N-1 and N+1 up to 65,536, plus the proven prime factors known for the stored N-1 / N+1 numbers. A new probable prime is on the list within minutes, and the figures follow as N-1 / N+1 get factored.
- Already provable numbers are left out unless "provable ones too" is ticked; they are then shown in bold. A proof is run when someone asks for it - the Prove button on the number's page - and not by the server on its own.
- API and command line: the JSON-RPC method
prp_candidatesandfdb list PRP --sort best(ornm1,np1,combined). - Prover: factorial and primorial primes (
n!±1,p#±1and their multiples) can now be proven with the Prove button; their witness lies beyond the range the prover used to search.
- Search & record with in-place "Create", "Prove", and "Test primality" actions, and next / previous prime buttons.
- Expressions: extended grammar with 13 named functions (Perrin, Motzkin, Padovan,
Lucas U/V, repunits, Smarandache, …) plus
@(n), the nth prime, with a Syntax help page. - Sequences: aliquot sequences with a digits-vs-iteration growth graph, and many more sequence types added. Overview filters and sorting: by end (open / merge / cycle / terminates), by driver or exact guide, by length / start / driver; categories by start size.
- Tables: curated factor-table families, including fill-in-the-parameters forms for multi-variable families such as near-Cunningham numbers (k*b^n+d).
- Download: pull candidates to work on (composites, cofactors, PRPs to certify, untested numbers) - deliberately light on the server.
- Report: paste a factor list or batch-upload certificates.
- Lists, Status, ECM calculator, Limits, Settings, and accounts / login.
- A full API documentation tab, and a light / dark theme.
- A mobile / responsive layout that uses the full width of the device.
- The classic endpoint
/api?query=...(or?id=...) is preserved and byte-compatible with the old JSON ({id, status, factors}), so yafu and other tools keep working unchanged. - A full JSON-RPC 2.0 API for programmatic access, with request batching.
- gzip / brotli response compression.
- Optional per-account API tokens.
- An official command-line client for the API: github.com/mtvb/factordb-cli.
- Per-client resource quotas keep the service responsive under load.
- HTTPS throughout.