factordb
Sign in
API
JSON-RPC 2.0 over HTTP - programmatic access to factordb

All calls are JSON-RPC 2.0 sent as an HTTP POST to /rpc - at https://factordb.com/rpc or https://factordb.com:4059/rpc, both the same service. The body is a request object (or an array of them for a batch); the response mirrors it.

curl -s https://factordb.com:4059/rpc \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"get_number","params":{"target":{"expr":"2^131-1"},"detail":2}}'

Response: {"jsonrpc":"2.0","id":1,"result":{…}}, or {…,"error":{"code","message"}} on failure.

Command-line client

fdb wraps every method on this page as a subcommand - numbers and factors, proofs, certificates, sequences, statistics, downloads and your account - with human-readable output by default and the raw JSON result on request. It can also drive an aliquot sequence forward with local gmp-ecm, reporting the factors it finds (fdb seq advance).

fdb number 2^127-1 --full
fdb report 1427247692705959880439315947500961989719490561 2^61-1
fdb download C 60 --count 100 --random

Source: github.com/mtvb/factordb-cli (Rust, GPL-2.0; cargo install --path . builds the fdb binary).

Addressing (the target parameter)

Many calls take a target, which is either an id or an expression: {"id": 42}  or  {"expr": "10^80+7"}. Expressions accept + - * / ^ %, ! (factorial), #/## (primorial), I(n)/lucas(n), the shortcuts M/F and b,n+/b,n-, named functions such as Q(n) (Perrin), @(n) (the n-th prime) and others, a reference to a stored id #<id>, and parentheses. See the full expression syntax & functions reference.

Authentication

Anonymous access works for reads within the default limits. To act as your account - higher limits, certificate upload - send your API token:

X-Fdb-User-Token: <your token>

Get a token from login / register (or rotate it with regenerate_token).

Example - your credited factors (contributions needs a signed-in account):

curl -s https://factordb.com:4059/rpc \
  -H 'Content-Type: application/json' \
  -H 'X-Fdb-User-Token: <your token>' \
  -d '{"jsonrpc":"2.0","id":1,"method":"contributions","params":{"limit":10}}'

Batching

POST an array of request objects to run several calls in one round-trip; the response is an array of results in the same order, each matched by id. Calls in a batch run sequentially.

Limits & accounting

Every response carries a X-Fdb-Resources: ids=…, time_ms=…, bytes=…, bg_ms=… header summing what the request consumed. Requests are rate-limited and quota-bounded per client (ids created, wall time, bandwidth, background-check time); exceeding a budget returns HTTP 429. See Limits (including the rules for automated requests) and call quota_status for your current usage.

Classic addresses (tools written for the old site)

These keep working unchanged, over https and over plain http (many old scripts cannot speak https), with the old field names and the old one-line answers:

/api?query=N, /api?id=Nthe classic JSON answer {id, status, factors:[[base, exp], …]}, every digit of every factor
/reportfactor.phpid= or number= plus factor= (GET or POST); answers "Factor submitted." etc.
/report.phpPOST report=<factor list> (elf / GMP-ECM output / N = f1 * f2 lines); one line per number
/login.phpPOST login=&pass= (and register=1&name=); sets the session cookie
/uploadcert.phpmultipart POST, file field cert (a certificate or a zip of them)
/cert/<fid>the stored certificate as a text file (also cert.php?id=)

write calls modify the database; account calls manage your session. Everything else is read-only.

Numbers & factors

get_idwrite

Resolve an expression to a factordb id (optionally storing it).

expr string a number or expression, e.g. 2^131-1, 10^80+7, 150!, @(1000000)
create bool if true, store it and its structure (a write); default false

→ { id, status, digits, created } (id = { kind, fid?, text }: kind stored with its fid, literal for a value up to 1018, which is its own id, or expr for a number not stored)

get_number

Full record for a number: identity, status, size, and (with detail) factors, primality and sequence membership. A factor that an import brought in carries import_source, the name of the source (e.g. mersenne.ca). created is the day the id was stored (YYYY-MM-DD, one record per day, so the day is exact to about a day), or <YYYY-MM-DD for ids older than the first record (November 2018). With snfs: true and detail: 2, an open composite of 80-400 digits also carries snfs, the snfs_poly answer, so a page needs no second call. With detail 1 or 2, projects lists the other projects that manage the number (or the number it is a cofactor of): name, url and, when the project takes reservations, reservations (where to check them before starting work).

target id or expr see “Addressing” above
decimal bool include the full decimal value when small enough
detail int 0 = basic; ≥1 folds in factors; ≥2 also folds in algebraic, sequence_of and primality

→ { id, status, digits, term, preview, decimal?, perfect_power, import_source?, factors?, primality?, algebraic?, sequence_of? }; status FF = fully factored

get_factors

The known factorization of a number. A factor above 1000 digits comes as a preview: base holds its leading digits, tail its trailing ones and digits its length - the whole value is get_number with {"id": fid} and decimal: true. A factor with status X is a part the answer did not expand (a very large factor tree): get_factors on its fid continues there.

target id or expr

→ { id, status, factors: [ { base, exponent, status, digits, tail?, fid? } ] } (fid for a stored factor; status FF = fully factored)

factor_of

The numbers a given number is a direct factor of (its cofactor "parents", one level up) - for climbing the divisor chain, e.g. to a parent with a missing algebraic factorization. Bounded.

target id or expr
limit int max parents to return (default 20)

→ { parents: [ { fid, digits, preview, term } ], truncated }

nearest_prime

The next prime above N, or - with below - the previous prime below it. Computed on request and returned view-only (resolved, not stored): it shows the existing record if already in the database, else an unstored view you can explicitly create. Capped at 1000 digits; the prime is a BPSW probable prime.

target id or expr the number N
below bool find the previous prime below N instead of the next above; default false
decimal bool include the full decimal of the result

→ { found, number?: { id, status, digits, term, preview, decimal? } } (found is false only when there is no prime below N, i.e. N ≤ 2)

primality

Primality state of a number and any certificate metadata.

target id or expr

→ { status, digits, kind, base?, variant?, cert_size?, cert_digits?, cert_type?, cert_uploader?, chain_fid?, chain_digits?, chain_step?, chain_index?, chain_steps? } (kind = direct / n-1 / n+1 / combined / certificate / chain_step; variant = kp for an N-1 proof by the Konyagin-Pomerance test, absent for Pocklington; a chain step is an intermediate prime of another number’s certificate: chain_fid names that number, chain_step the step, chain_index its 0-based position among the chain_steps recorded steps)

algebraic_factors

Algebraic factorization panel (e.g. difference/sum of powers, Aurifeuillian).

target id or expr

→ the algebraic decomposition of the expression, when one applies

snfs_poly

SNFS polynomials for a composite without known factor (80-400 digits) whose own term, or the term of a number it divides, has a special form: sums of powers of one base, binomials in two bases, cyclotomic and Aurifeuillian parts. Computed on request. As a file for GGNFS / yafu, msieve or CADO-NFS: /snfs.php?id=…&format=ggnfs|msieve|cado. With degree and y0 (and y1): only the polynomial with that rational side g = y1·x + y0 - the pair a number shares with its snfs_siblings, for a co-sieved run - whether or not it is the number's best, with n the largest open part (composite or untested) of a number with known factors; empty polys when it has no such polynomial. As a file: /snfs.php?id=…&deg=…&y1=…&y0=…&format=…. Instead, with c: only the polynomial with that algebraic side f = Σ c[i]·x^i (compared up to a constant factor and x → -x), returned with c as given and the number's own rational side; as a file /snfs.php?id=…&f=c0,c1,…,cd.

target id or expr
degree int? with y0: the degree of the pair
y1 string? with degree: the rational side's y1 (decimal; default 1)
y0 string? with degree: the rational side's y0 (decimal)
c string[]? instead of degree / y1 / y0: the algebraic side c0..cd (decimals)

→ { n?, polys: [ { c: [c0..cd], y1, y0, skew, difficulty, scaled, side, e, form } ] } - best first; f = Σ c[i]·x^i, g = y1·x + y0, common root -y0/y1 mod n; scaled = difficulty plus the norm-imbalance penalty (selects sieving parameters), side = special-q side (a / r), e = Murphy E. Empty polys when there is nothing to offer

snfs_siblings

The numbers that share the rational side of the number's best SNFS polynomial (the same degree and the same g = y1·x + y0). The factor tables' members are found by the hash of m = -y0/y1 (across forms: every near-repdigit of one size shares x - 10^k); a number outside the tables is searched in its own family as well (the form with its exponent or sequence index changed by up to twice the degree, either sign of a trailing constant). A member is listed while the shared pair reaches half the Murphy E of its own best polynomial. With side: "algebraic" the numbers that share its algebraic side instead (the same f up to a constant factor and x → -x, each with its own rational side; outside the tables the family is searched at the own exponent plus multiples of the degree). Read-only, at most a few seconds.

target id or expr
side string? "rational" (default) or "algebraic"

→ { form?, degree?, y1?, y0?, side?, c?, siblings: [ { term, digits, id?, status?, open_digits?, difficulty, rank, relative_e, best_degree?, best_difficulty? } ], total?, cut? } - at most 99, the nearest in difficulty to the number's own, listed easiest first, the number itself not listed; id / status only for stored members, open_digits the size of the largest composite or untested part; rank the shared pair's position in the member's own list (0: its best, else best_degree / best_difficulty describe the best), relative_e its Murphy E over the best's; total when more members share the side than are listed; cut when the time budget ended the search; side ("algebraic") and c (the shared f, c0..cd) for the algebraic side, whose polynomial a member gives with snfs_poly and c.

snfs_side_numbers

Which numbers can my SNFS side factor? For the factorization factory: one side of the number field sieve is sieved once, and every number with an SNFS polynomial on that side is factored with its own other side. Given a rational side g = y1·x + y0 (or x - m), the numbers whose polynomial of any degree from 3 to 9 has that root m = -y0/y1; given an algebraic side f, the numbers whose polynomial has that f (up to a constant factor and x → -x), each with its own rational side. The numbers come from the factor tables (an index of their members from the first open one up to 400 digits), each listed once with its cheapest polynomial on the side. Give one side: m, or y0 (and y1), or c. Read-only, at most 5 seconds per page. Web page: /snfsside.php.

m string? the rational side g = x - m: a number or expression, e.g. 10^42, 2^161 (at least 2)
y0 string? instead of m: the rational side g = y1·x + y0 (decimal)
y1 string? with y0 (decimal; default 1, not 0)
c string[]? instead: the algebraic side f = Σ c[i]·x^i, c0..cd as decimals (2 to 13 of them, cd not 0)
min_digits int? only numbers of at least this many digits
max_digits int? only numbers of at most this many digits
min_degree int? rational side only: the lowest degree of the numbers' own f (3 to 9)
max_degree int? rational side only: the highest degree of the numbers' own f
all bool? also numbers fully factored or prime by now (the index drops them weekly); default false
offset int? position in the list to start from (the previous page's next); default 0
limit int? numbers per page, 1 to 1000; default 100

→ { side, y1?, y0?, c?, total, numbers: [ { id, term, digits, status, open_digits?, degree, difficulty, cost } ], next?, cut? } - side "rational" with the side as y1 / y0 (an m as y1 1, y0 -m), or "algebraic" with c, the side in a canonical form (content removed, the smaller of f(x) and f(-x), leading coefficient positive); total the numbers on the side in the index (within the digit and degree filters); numbers the cheapest own side first: cost is the size (digits) of the norm of the number's other side, the one not shared, at its polynomial's skew with |a|, |b| about 10^9 (the algebraic norm for a shared rational side, the rational norm for a shared algebraic side), degree the degree of its f, difficulty the SNFS difficulty of the pair, open_digits the size of its largest composite or untested part; next the offset of the next page when more follow; cut when the time budget ended the page early (continue from next). A number's polynomial file: snfs_poly with degree / y1 / y0 or with c, or /snfs.php?id=…&deg=…&y1=…&y0=…&format=ggnfs|msieve|cado (rational) / /snfs.php?id=…&f=c0,c1,…,cd&format=… (algebraic).

get_family

Neighbouring numbers of the same family (e.g. x^n±1) around an expression.

expr string the family expression
start int or string first index (may be negative); an integer of up to 100 digits, as a decimal string when beyond 64 bits
limit int how many to list
factors bool? also return each member’s factorization

→ { members: [ { x, member: { id, status, digits }, preview, tail?, term?, factors?: [ { base, exponent, status, fid? } ] } ], next? }; preview / tail = the member’s leading digits and, above 100 digits, its last 100, as in get_number; status is the effective one (a fully factored composite is FF, as on its own page); factors as in get_factors. A page has a time limit as well as a size limit: when it runs out the page holds the members done so far and next is the index to continue from. x and next are JSON integers within 64 bits and decimal strings beyond

report_factorswrite

Submit one or more found factors of a number. Verified exactly (a wrong factor is rejected); promotes/creates rows as needed.

target id or expr
factors string[] decimal or expression factors, e.g. ["1009","2^32+1"]
credit bool credit the submitted factors to the signed-in account: a factor counts when both it and the cofactor it leaves are new to the database and have at least 30 digits (the number itself may be new); credited factors are shown with the display name of the account; ignored when anonymous

→ { id, status, created_ids, credited? }

Primality proofs (special-form)

check_factorswrite

Run the next bounded P-1 / P+1 / ECM step on a stored composite of at most 500 digits (the "Check for factors" of the sequence and number pages): level 0 P-1 to B1=50k, 1 three P+1 curves to B1=150k, 2 ten ECM curves to B1=250k, 3 (below 65 digits) forty ECM curves to B1=1M. The level is kept per number, so every sequence the composite blocks shares it. A factor found is reported like report_factors. Runs up to 100 s; a run cut off by that limit without a factor is not counted (timed_out, the level stays). At most 8 at once server-wide.

target target the composite (C/U)
dry_run bool only report the level and the next step

→ { fid, digits, status, level, max_digits, step?, ran, factors?, timed_out? }

provewrite

Run a deterministic special-form proof (Pocklington N-1 / Morrison N+1 / combined BLS75 / Konyagin-Pomerance N-1). Small numbers inline; large ones queue for the background prover.

target id or expr

→ { proved, queued, method?, witness?, digits, promoted? } (method 1 = N-1, 2 = N+1, 3 = combined, 4 = N-1 Konyagin-Pomerance)

proof_progresswrite

Per-method completeness for a number and what each proof would cost/queue. May auto-create the N∓1 ids for a large PRP.

target id or expr

→ per-type completeness, thresholds, queued/est_ms and remaining background budget

proof_state

Poll a number’s proof state (after a large proof was queued).

target id or expr

→ { status, digits, queued }

proof_list

List numbers proven prime by a special-form test.

type_id int 1 = N-1 (Pocklington), 2 = N+1, 3 = combined, 4 = N-1 (Konyagin-Pomerance); 0/other = all
min_digits int
descending bool largest first
skip int
limit int max 1000

→ { proofs: [ { fid, digits, type, base, term, preview, tail } ] } (term is the formula when stored as one, else empty; preview/tail are the leading/trailing decimal digits for a "head…tail" display)

Probable-prime tests

prp_testwrite

Run a BPSW probable-prime test on an untested (U) number; settles it U→PRP or U→C. Large ones queue.

target id or expr

→ { queued|tested, ... }

prp_test_info

Whether a number is PRP-testable and the cost a queued test would drain.

target id or expr

→ { testable, est_ms, will_queue, check_remaining_ms }

Certificates

get_certificate

The stored primality certificate of a number (Primo / CM / gmp-ECPP), if any, with its metadata; the text is inline up to 64 MB (too_large: true above that). For any size, GET /cert/<fid> serves the certificate as a plain text file, streamed - the address the site's download link uses.

target id or expr

→ the certificate text and its metadata

upload_certificatewrite

Upload a primality certificate for a number (PRP→P on verification).

data string the certificate text
session string ignored (kept for older clients) - the upload is credited to the account of the X-Fdb-User-Token header

→ { ok, ... }

cert_list

List certificates (newest/largest first), optionally only those still pending verification.

min_digits int
pending bool only pending
descending bool
skip int
limit int
user int only this uploader (uid; 0 = anonymous)
type int only this software version (its id, see cert_software_top)

→ { certs: [ ... ] }

cert_chain

The certificate dependency chain for a number (a cert that references smaller certified primes). Large chains have thousands of steps: page them with skip/limit.

target id or expr
skip int rows to skip (default 0)
limit int rows to return (default 0 = all, max 10000)
sizes bool only step and digits per step (for a graph; fast for any chain length)

→ { fid, total, skip, chain: [ { step, tofid, digits, type, term, preview, tail } ] } (with sizes: chain: [ { step, digits } ])

cert_stats

Certificate totals, plus the verifications in flight with their progress (done of total steps, digits = the step size reached) and what names the number: its term when that is an expression, else its leading (preview) and trailing (tail) digits and its length (number_digits).

No parameters.

→ { total, verified, pending, processing, running: [ { fid, done, total, digits, started, term? | preview?, tail?, number_digits? } ] }

cert_top

Certificate leaderboard by uploader: the top 100 accounts (uid 0 = anonymous), score = Σ (digits/1000)⁴ over verified certificates, plus totals over all uploaders.

sort string score (default) / n / size

→ { users: [ { uid, fullname, certs, size, score } ], totals: { rows, certs, size, score } }

cert_software_top

Certificate leaderboard by software: the programs (grouped, by score) and the top 100 software versions.

sort string score (default) / n / size, for the versions table

→ { programs: [ { program, versions, certs, size, score } ], versions: [ { type, program, version, certs, size, score } ], totals }

Aliquot sequences

get_sequence

The terms of an aliquot sequence.

start id or expr the starting number, e.g. {"expr": "276"}
from int first iteration to return
type int sequence type: 1 = aliquot (default), the others as on the sequences page

→ the sequence terms from from onward. Sequence ids (base, a merge end’s base, start_id) name a term’s base; a perfect power bk is never a stored number of its own, so such an id comes with its exponent (base_exp / exp / start_exp, present only when above 1): the number meant is baseexp

sequence_sizes

Digit size of each term, plus the aliquot driver it sits on (data for the colour-by-driver growth graph).

start id or expr the starting number
from int
type int sequence type (default 1 = aliquot)

→ { sizes: [int], drivers: [int] } - per-term digit count and driver code (0 none, 1 downdriver, 2-5 named, 6 even-perfect), parallel arrays

sequence_status

Status of a sequence (open / merged / cycle / terminated).

start id or expr the starting number
type int sequence type (default 1 = aliquot)

→ the sequence’s current status and frontier (base + base_exp?, merge ends with base + exp?, see get_sequence)

sequence_view

A window/segment of a sequence for display. For an open frontier inside the window the answer also carries check: the check_factors dry-run plan of the remaining composite (level, step, digits, fid; or { error }), so a page needs no second call.

start id or expr the starting number
type int sequence type (default 1 = aliquot)
part string all / last / range
fr int range start
to int range end (inclusive); absent = to the end

→ a bounded view of the sequence

extend_sequencewrite

Compute and store more terms of a sequence.

start id or expr the starting number
steps int how many iterations
type int sequence type (default 1 = aliquot)

→ the newly computed terms

list_sequences

Browse known sequences with sorting/filtering, including by aliquot driver.

limit int rows per page: default 100, at most 500
offset int rows to skip, for paging
type int sequence type (default 1 = aliquot)
category int
end_kind string? open / merge / cycle / terminus, or the merges split by what their trunk ends in: merge-open / merge-terminus / merge-cycle
sort string? length / start / driver / composite (the open sequences by the digit count of their blocking composite, alone or with driver; with another end_kind or a guide it is length)
dir string? asc/desc
driver int? filter to one aliquot driver: 0 none, 1 downdriver, 2-5 named, 6 even-perfect
guide int? filter to one exact frontier guide value (finer than driver)
all bool? every start range at once, merged in the chosen order (category and offset are then not used); the next page is asked for with after
after string? with all: go on after this position - the next of the previous page
max_category int? with all: only the start ranges 0 to this one (category 0 = starts up to 1,000, n = above 10^(n+2) up to 10^(n+3); 3 = up to 10^6, 15 = up to 10^18)

→ { sequences: [ { start_id, start_exp?, start, digits, length, end, last_id?, last_exp?, factors?, merge_base?, guide, class, driver, trunk_end? } ], next? } (next, with all: the position for the following page, when there is one; last_id = an open sequence’s last term, with last_exp when it is a perfect power, as for start_id; factors = that term, factored as far as known, [ { base, exponent, status, fid? } ] as in get_factors - its value is their product and its unfactored composites are the C / U factors; merge_base = the start of the sequence a merging one joins; guide = factored guide of the frontier term, class = its stability, driver = the code above; trunk_end, for a merging sequence, is what the sequence it finally ends in ends in: open, cycle or terminus)

sequence_of

Which sequence a number belongs to.

target id or expr

→ the containing sequence’s start (if any): start_id + start_exp? and the start’s decimal value; a perfect-power expression such as 11^48 is looked up as its base with the exponent. An entry with open_composite: true is an open sequence whose last term (index) is held up by this stored composite - the composite a factor of which advances it

Statistics & listings

status

The whole status page in one call: table counts, smallest unresolved numbers, comb-scan progress, certificate / proof / ECM-factor stats, and calls_per_sec (RPC calls handled per second, mean over the last minute).

No parameters.

→ a merged object; sub-sections may be null when their tables are absent

stats

Global counts per table (P / PRP / C / U / CF) and disk usage.

No parameters.

→ the count/size summary

smallest

The smallest unresolved number of each kind.

No parameters.

→ { prp, c, u }, each { fid, digits, preview, tail } (tail = trailing digits, empty when short)

comb_progress

Progress of the small-factor (comb) scanner.

No parameters.

→ per-level scan progress

digit_distribution

Row counts per digit length across a range (data for the distribution chart).

start int first digit length
count int how many lengths

→ per-digit-length counts by table

factor_tables

The factor tables (the Tables page): categories of number families, each with its formula, the defaults of its other variables and its OEIS sequences, and - once computed - its first member that is not fully factored.

No parameters.

→ { categories: [ { id, name, entries: [ { name, formula, parm?, oeis?, frontier? } ] } ], frontier_checked? } - parm in query-string form: v = the variable that varies, the defaults of the others, and E / EC / OD / EV = only prime / composite / odd / even values of the variable; oeis = A-numbers, comma-separated (the values, the indices of the primes, the primes); frontier = { n, open_digits, open_count, kind }: the first member of the default values that is not fully factored (a PRP counts as factored) - its value of the varying variable, the digits of its largest open part, how many parts are open, and kind C (no factor known) / CF (a composite part left) / U (untested) / new (not stored yet); left out until computed. Refreshed every 3 minutes;frontier_checked = Unix time of the last refresh

list_by_type

List numbers of one table, smallest first.

table string P / PRP / C / U / CF
min_digits int
max_digits int upper bound (inclusive); 0 or absent = none
offset int
limit int

→ { rows: [ { fid, digits, term, preview, tail } ], has_more }

prp_candidates

Probable primes ordered by how far N-1 / N+1 are factored into proven primes, most factored first - the candidates closest to an N-1 or Morrison (N+1) proof. A proof is possible (prove) from 3/10 of N-1 (Konyagin-Pomerance, Pocklington from one third) or one third of N+1; nothing is proven without a request.

sort string best (the better side, default) / nm1 / np1 / combined
min_digits int
max_digits int 0 = no bound
open bool leave out the numbers a proof (N-1, N+1 or combined) is possible for already
max int only rows at or below this value of the sort column, in hundredths of a percent (default 10000 = all)
offset int
limit int

→ { rows: [ { fid, digits, term, preview, tail, nm1, np1, comb, ready } ], has_more } - nm1 / np1 / comb in hundredths of a percent (comb = the combined test, 3·max + min); ready bits: 1 = N-1 proof possible, 2 = N+1, 4 = combined

ecm_list

List factors found by ECM / P±1 (each validated by its curve group order).

type_id int 1 = ECM (Montgomery, param 0), 2 = P-1, 3 = P+1, 4 = ECM (Edwards), 5-7 = ECM (GMP-ECM param 1-3); 0 = all
min_digits int
by_time bool order by discovery time
descending bool
skip int
limit int

→ { factors: [ { fid, digits, b1, b2, sigma, type, ts, uid, submitter, term, preview, tail } ] }

ecm_finds

The recorded ECM / P-1 / P+1 finds of the given prime factors (the number page's ECM box).

ids int[] factor ids, at most 200

→ { finds: [ { fid, type, b1, b2, sigma, ts, uid, submitter, order: { fid, digits, preview, tail } } ] } - type as in ecm_list; order is the group order (p-1 / p+1 for P-1 / P+1)

report_ecmwrite

Report how a stored prime factor of 25 to 100 digits was found. The group order of the curve (p-1 / p+1 for P-1 / P+1) is computed and must be smooth within the bounds: every prime factor at most B1, except one up to 20·B2 (B1² without a B2). Then the find is recorded, credited to the signed-in account.

id int the prime factor
method string ecm / edwards / pm1 / pp1
param int GMP-ECM param for ecm: 0 = Suyama, 1 = default of GMP-ECM 7, 2, 3
sigma string the curve sigma (ecm / edwards)
b1 string stage-1 bound
b2 string stage-2 bound, optional

→ { ok, type, order_fid }, or { ok: false, error }

Tools & downloads

ecm_group_order

Compute the elliptic-curve group order #E(F_p) for a GMP-ECM (param, sigma) over a prime, and factor it - showing the B1 at which ECM finds p. All four parametrizations, and Edwards curves (curve).

number string a prime, ≤ 100 digits (expressions allowed)
param int 0 = Suyama, 1 = default, 2/3 = batch/GPU
sigma string the sigma value
curve string edwards: the Edwards curve for sigma (from σ·(12, 40) on y² = x³ - 8x - 32) instead of a GMP-ECM curve; param is then not used. Omit for GMP-ECM

→ { ok, order, factors, cofactor?, largest_prime?, montgomery_a, weierstrass_a4, curve? } (for an Edwards curve curve: "edwards", and montgomery_a / weierstrass_a4 are empty)

download

Pull a bounded batch of candidate numbers to work on (composites to factor, PRPs to certify, untested to test). Index-bounded and capped - light on the server.

table string C / CF / PRP / U / P
digits int digit size (minimum, or exact with random)
count int max 50000
random bool random sample at exactly digits digits, else smallest first
terms bool each number as its full stored term (a cofactor as (parent)/factors) instead of the export format

→ { count, numbers: [ string ] } (export format: a + - * ^ term or the decimal; with terms the full stored term)

primo_batch

Primo input for the probable primes that have no certificate yet (none uploaded or pending): the smallest from digits digits up, each with its value in base 16 (the N$= line of a Primo input file). The download page zips them. Capped at 32000 numbers and ~10 MB of digits.

digits int minimum digit size (default 300)
count int max 32000 (default 10)

→ { count, numbers: [ { fid, digits, hex, term? } ] } (term only when it is a formula of fewer than 100 characters)

Account

loginaccount

Authenticate; returns a session/API token to use in X-Fdb-User-Token. Failed attempts are throttled per account and per address: after a few, each further attempt must wait (the wait doubles; retry_after in seconds comes with the refusal, and a too-early retry is an error).

user string
pass string

→ { ok, token?, uid?, login?, fullname?, perm?, error?, retry_after? } (token is the API token)

registeraccount

Create an account. One account per client address per 30 minutes; a second attempt within that time is an error.

user string login name
pass string
name string display name

→ { ok, token?, uid?, login?, fullname?, perm?, error? }

whoamiaccount

Identity for a session/API token.

session string the API token

→ { found, uid?, login?, fullname?, perm? }

regenerate_tokenaccount

Issue a fresh API token (invalidates the old one). The account is the one of the token sent in the X-Fdb-User-Token header; there are no parameters.

No parameters.

→ { ok, token?, uid?, login?, fullname?, perm? }

change_passwordaccount

Change your password (send your API token). The current password must be given; wrong ones are throttled like failed sign-ins. Your API token stays the same.

old string the current password
new string the new password (at least 6 characters)

→ { ok, error?, retry_after? }

logoutaccount

Invalidate a session/API token.

session string

→ { ok }

quota_statusaccount

Your current resource usage against the limits (exempt from the quota block).

No parameters.

→ used vs cap for ids / wall-time / bandwidth / background-check-time

contributionsaccount

Your credited factor contributions (earned with the credit flag of report_factors), newest first. Sign-in required; an account sees only its own rows.

skip int
limit int max 1000 (default 100)

→ { total, largest_digits, rows: [ { fid, digits, ts, term, preview, tail, parent, parent_digits, parent_term, parent_preview, parent_tail } ] }

Utility

health

Liveness check.

No parameters.

→ { status: "ok" }