Welcome
NumberDB is a collaborative database of numbers. The underlying idea is that in practise, numbers are determined by their first 10 digits. That makes them searchable. NumberDB attempts to be a tool to identify numbers, and to show known descriptions. Which numbers are stored depends on their simplicity and their relevance. NumberDB stores numbers in tables. Tables are families of numbers together with a description. Thus a number can appear in several tables: For example, the number 1 is in the table of Integers, Values of the Gamma function, and it has its own table One as it is a special number. Tables of numbers also contain a definition, a description of parameters, and possibly formulas, comments, references, links, programs, and further more specific information. Furthermore tables are given tags, which helps searchability and classification.How to search
The searchbar can be used to search for:-
Real numbers:Enter the number in one of three formats:
- Decimal representation including the period, e.g. "3.14" to search for pi. The search will be done in an interval around the entered number: Entering "3.14" will search for numbers in the interval (3.13, 3.15).
- Scientific notation (no period necessary), e.g. "14e2" to search numbers between 1300 and 1500.
- NumberDB's p-notation: Enter a term of the form "ApB", where A and B are integers. It corresponds to the number 10A · 0.B, e.g. "1p314" for pi. The sign of the number is determined by the sign of B.
-
Fractional parts of real numbers:Enter the first few digits after the period, e.g. "1415" for pi.
-
Integers:Enter the exact integer without period, e.g. "-1". This works for integers with up to 127 binary digits (roughly 38 decimal digits). For longer integers, try to search them as real numbers.
-
Complex numbers:Enter sums or differences of the form "A" or "i*A" or "A*i", where "A" is a real number in the above format or a rational number. Entering "-1/2 + i * 0.86602" (to search for a third root of unity) will search within a larger square around it. Both, real and imaginary parts need sufficient precision.
-
$p$-adic numbers:Search for numbers in $\mathbb{Q}_p$ in one of two formats:
- Enter "Q2:1010" to search for $2^0 + 2^2 + O(2^4)$. Enter "Q2:1.1010" to search for $2^{-1} + 2^0 + 2^2 + O(2^4)$. For $p>10$, any $p$-adic digit needs to be given in base 10 with the same number of base 10 letters as $p$, e.g. "Q13:0102" will search for $13$-adic numbers of the form $1+2\cdot 13 + O(13^2)$. Minus signs are also interpreted, e.g. "Q3:-220" searches for $-(2 + 2\cdot 3^1) + O(3^3)$.
- Enter "3 + O(2^5)" or "2^0+2^1+O(2^5)" for numbers of the form $2^0 + 2^1 + O(2^5)$. This format also works for $\mathbb{Q}_p$, e.g. enter "3/5 + O(5^1)".
-
Polynomials over $\mathbb{Q}$:Enter polynomials over $\mathbb{Q}$ in arbitrary variables, e.g. enter "x^6+y^6-x^5*y^5+4*x*y" to search for $x^6+y^6-x^5y^5+4xy$.
-
Tables:Enter words from the table's title, keywords, tags, definition, or comments.
-
Tags:Enter the first letters of one word of a tag, e.g. "irr" for the tag "Irrational".
Advanced search guide
The advanced searchbar can be used to search for:-
Lists of real numbersUse Sage syntax to enter a number, a list of numbers, or a dictionary of the form {param: number}. The lists and dictionaries may be nested. The numbers might be given via formulas involving standard functions such as sin and sqrt, as well as standard constants such as e and pi.
Examples:-
-2, pi, esearches for certain constants. -
{n: 2^n for n in [1..10]}searches for $2^1$, ..., $2^{10}$. -
RIF(10,11)searches for all numbers contained in the interval $[10,11]$. -
{a: {b: a/b for b in [1..5] if gcd(a,b) == 1} for a in [-5..5]}searches certain small rational numbers.
-
-
Lists of complex numbersSimilarly one can search for complex numbers. Recommended parents are CIF (complex interval field), CBF (complex ball field), and SR (symbolic ring), although CC (complex field via floats) should work as well unless too much precision is lost during the computation.
-
Lists of p-adic numbersSimilarly one can search for p-adic numbers in $\mathbb{Z}_p$ and $\mathbb{Q}_p$.
Examples:-
Qp(2,prec=4)(5)searches for $5 + O(2^4)$ = $2^0 + 2^2 + O(2^4)$, that is, any $2$-adic integer with first four $2$-adic digits $1$, $0$, $1$, $0$. -
{n: Qp(2)(n) for n in [1..10]}searches $1$, ..., $10$ up to $O(2^{20})$ as $2$-adic numbers; note that 20 is the standard precision for Qp in sage.
-
-
Lists of polynomials over $\mathbb{Q}$Similarly one can search for multivariate polynomials over $\mathbb{Q}$. As only expressions are accepted (mainly for safety reasons), we can define the variables as in the following example:
-
[{n: x^2 + n for n in [1..10]} for x,y in [polygens(QQ,2,'x')]]searches for polynomials $x^2+n$ for integers $n=1,\ldots,10$, where we allow two variables $x$ and $y$.
-
Number types and displayed accuracy
Numbers in NumberDB can be of the following types.-
Integers:Integers are represented exactly as decimal numbers, e.g. "3" and "-1729".
-
Rational numbers:Rational numbers are represented exactly as fractions of integers, e.g. "-3/2".
-
Real numbers:Real numbers are usually hard to represent exactly. Instead we store an exactly represented interval that contains the real number. The smaller the interval, the higher the accuracy. The interval can be given in one of the following formats:
- Decimal expansion: e.g. "3.14" represents the interval $[3.13, 3.15]$, that is, the last digit may be off by at most $1$. Scientific notation is allowed, e.g. "12e2" represents the interval $[1100, 1300]$. Note: If the decimal expansion does not contain "." or "e", it will instead denote an exactly represented integer.
- Real interval: e.g. "[2, 2.3728596]". The end-points are exactly given.
- Real balls: e.g. "3.14 +/- 2e-2" represents the interval $[3.12, 3.16]$. The center and radius of the real ball are exactly given.
- NumberDB's p-notation: e.g. "1p31415" represents the interval [3.1414, 3.1416]. In general, for two integers A and B, "ApB" corresponds to the decimal expansion 0.BeA, where again the last digit of B may be off by 1. The sign of the number is determined by the sign of B.
-
$p$-adic numbers:$p$-adic numbers in $\mathbb{Q}_p$ are usually hard to represent exactly. Instead we store an exactly represented $p$-adic ball that contains the $p$-adic number. The smaller the radius of the ball, the higher the accuracy. The ball can be given in one of the following (equivalent) formats:
- Rational representative: e.g. "3+1/2 + O(2^3)" represents the $2$-adic ball $2^{-1} + 2^0 + 2^1 + O(2^3)$. The rational representative might be given as an algebraic expression involving integers and the usual operations "+", "-", "*", "/", and "^".
- $p$-adic expansion: e.g. "Q2:1.110" represents the $2$-adic ball $2^{-1} + 2^0 + 2^1 + O(2^3)$. Note: The most significant digit stands on the left. The $p$-adic digits are given as base 10 numbers with as many letters as the base 10 representation of p. E.g. "Q13:01.02" represents the $13$-adic ball $13^{-1}+2\cdot 13^0 + O(13^1)$. The decimal point is not necessary, e.g. "Q2:110" represents the $2$-adic ball $2^0 + 2^1 + O(2^3)$. Minus signs are allowed, e.g. "Q2:-110" represents the $2$-adic ball $-(2^0 + 2^1) + O(2^3)$.
Numbers not found by search
Searching by number answers one question: you have a number — from an experiment, a computation, a paper — and you want to know whether it is already known, and where else it appears.A few numbers here cannot answer that question, because nobody knows them precisely enough. The exponent of matrix multiplication is only known to lie somewhere in [2, 2.3728596], and the diagonal Ramsey number R(5,5) somewhere in [43, 48]. If searching for 2.3 returned the matrix multiplication exponent, that would not tell you that your number is that exponent — only that a wide range happens to contain your number, which is equally true of every value in it.
So such numbers are left out of search by number. They are marked in the tables with a dagger, like †, and you can still find them by name or by tag — searching for “matrix multiplication” finds the exponent, and that is the useful way to ask about it.
The cutoff is a relative precision of 1e-05: a value counts as identifiable when it is known to roughly that fraction of its own size, which is about five significant digits. Relative rather than absolute, because a number near 1012 known to within 0.0001 is pinned down far more sharply than a number near 1 known to within the same amount.
The precision that counts is what is actually known about the number, not how it happens to be displayed. A value stored as an exact fraction is known perfectly however it is rounded for display, and a measured value such as 0.88153(17) is known only to the digits its error bars allow.
Python and Sage interface
NumberDB can be searched from Python, and from SageMath, with thenumberdb package.
pip install numberdb
>>> import numberdb
>>> for result in numberdb.search('{n: pi^n for n in [1..5]}'):
>>> print(result.exact_text, result.table.title)
The same package serves Sage. Install it into Sage's Python with
sage -pip install numberdb, and ask a result
for .sage() to get the number as a Sage object.
Sage is optional: without it you still get exact values as Python
int, Fraction
and interval endpoints.
The package also writes. A table's numbers come from a program, and that
program is a Generator: a function from one
entry's parameters to its value, plus a way to enumerate the parameters. See
creating new tables for one
in full.
Two questions are worth asking of a table that already exists, and each is one call. Has this table drifted from the code that claims to produce it — after the script changed, or the software underneath it did?
>>> report = Zeta().verify() # ten entries, spread through the table
>>> report
<VerifyReport T42: 10/10 matched, 0 differing, 0 missing, 0 extra>
>>> zeta = Zeta()
>>> report = zeta.verify()
>>> if not report.ok:
>>> zeta.publish(only=report.to_fix())
Verifying needs no API key and writes nothing, which is what makes it worth running on a table that takes a day to recompute in full.
A hundred digits can be proven, believed on a stated assumption, checked by agreement, or simply assumed. A table that does not say presents all four identically, so a generator states it and the table shows it under Data properties:
- exact — an integer, a rational, a polynomial. Nothing to be wrong about.
- proven — interval or ball arithmetic throughout, so the digits follow from the width of the result. This is the default, and it is checked: a value that carries no error of its own cannot have a proven one.
- assumed-bound — computed in fixed precision, with an error bound the author asserts and justifies.
- heuristic (agreement-checked) — computed twice at different precisions, keeping the digits that agree. Measured rather than assumed, and not a proof: two runs of a wrong method agree perfectly.
- heuristic — one computation and a guard chosen by judgement.
- measured — not computed at all. The value comes from experiment and the interval holds the measurements together with their stated uncertainties, as for the fine-structure constant. This one is not on the same scale as the others: asking whether measurement beats agreement-checking has no answer, because they are not the same kind of claim.
Most tables do not say yet, and an absent line means nobody has established it rather than that the digits are poor. Working through the rest is work in progress.
Anonymous use is rate limited. See API access.
API access and rate limits
NumberDB has a small JSON API for reading and, with a key, for writing. The API reference lists every endpoint. The numberdb package is the supported way to use it; it handles the response format, the retries and the crash-safety, so you do not have to.Anonymous use is limited to 60 requests per hour. Searching runs your expression on our machine, and NumberDB is a small volunteer project on a small server — the limit is there so that one script in a loop cannot make the site unusable for everyone else.
An API key raises the limit to 1000 requests per hour. Being logged in on the website counts as identified too. Set the key in the environment rather than in your worksheet, so a notebook you share does not carry it:
export NUMBERDB_API_KEY=...
Retry-After header; the package raises
numberdb.RateLimitError, carrying the same number
of seconds.
Create one on your profile. A key is shown once when it is created and stored only as a hash, so nobody can look it up later — not you and not us. If you lose one, revoke it there and take another.
Keep it out of the code you publish. The package looks for it in
NUMBERDB_API_KEY, then in a
.env beside your script, then in
~/.config/numberdb/env — the last of
which is in no project directory, so it cannot be committed by accident. The
keys page shows the exact lines to paste.
A key says who you are; it does not by itself allow writing. That needs a few of your edits to have been reviewed and confirmed, which your profile shows.
If you need more than this — a bulk download, or a systematic study — please get in touch rather than working around the limit. We would rather help.
How to contribute
Everything here is edited on this site. You need an account, which takes a moment and an email address, and nothing else.-
A wrong digit, a missing reference, a clearer definition:Sign in and click edit under the table's title. Your change is published when you save it, and you are asked to say what you changed, because the next person reading the history needs to know. The guide to editing tables has the detail.
-
A number that should be here and is not:If it belongs in a table that exists, add it in that table's editor. If it needs a table of its own, use new table — see the guide to creating new tables. A title and one number are enough to start.
-
A great many numbers, computed by a program:Write the program, and let it publish its own results: install the numberdb package, write a generator, and send them with an API key. The code that produced the numbers is stored beside them, so a reader can see how a value was obtained rather than being asked to take it on trust. See Python and Sage interface.
-
A question about a particular table:Every table has a discussion, linked beside its title, for asking where a value came from, why one looks wrong, or what a parameter means. Anyone can read it; anyone who may edit the table may post. A correction itself belongs in an edit rather than a message — the edit's own note says what changed.
-
A bug in the website, or an idea for it:The issue page on GitHub, please, or an email to info@numberdb.org. The site's code is at numberdb-website and patches are welcome.
About the data repository. numberdb-data is where the corpus can be read, cited and forked in bulk. It is no longer where tables are changed: it mirrors what this site holds, and a commit made there would not appear here. If you have come from that repository intending to send a pull request, the table's edit button is the shorter road, and the only one that arrives.
Every change is attributed. Each table records who edited it and when — follow history under its title — each entry can be traced to the edit that last touched it, and everyone who has contributed appears in the list of contributors below.
Guide to editing tables
Sign in and click edit under any table's title. You get the table's source in an editor, with a preview of how the page will look. Nothing is saved until you press Save.
- Show preview renders your version exactly as the table page will render it, so you can see the result before committing to it.
- Show changes lists what you have actually altered, which is the only practical way to check an edit to a table of a thousand entries.
- Save publishes immediately.
Your change is live as soon as you save it. The entries you changed are marked as needing review and are left out of search by number until a reviewer confirms them; everything else in the table is unaffected, and the entries themselves stay visible on the page throughout. This is deliberate: a reader looking at a table can see that an entry is unconfirmed and weigh it, while somebody typing digits into the search box cannot, because a wrong fortieth digit looks exactly like a right one.
If two people edit at once, edits to different entries are combined automatically. Edits to the same entry are not guessed at: you are shown both versions and nothing is saved until you decide.
For more advanced changes, it is worth reading the format for tables. You can also try the preview page without an account, which renders any table source without saving anything.
Existing tables are edited here and nowhere else. The data repository numberdb-data is where the corpus can be read, cited and forked, but it is a mirror of what this site holds rather than a second place to change it: a commit made there would not be visible here until the database was rebuilt, and that rebuild would discard anything edited on the site in the meantime. Two places to change the same table means whichever was written second quietly wins, so there is one.
Creating a new table is done here too; see the guide below.
Guide to creating new tables
Sign in and use new table. You are given a template with every section a table normally has, in the order they usually appear, so you can see what is expected rather than having to find an example.
A new table needs a title and at least one number. One is enough. A table with none is a draft, and a published draft holds a permanent identifier, appears in the listings and answers nothing — there is no way for a reader to tell it apart from a table somebody gave up on. So write the prose, enter one value by hand, and let a program add the rest if there are more.
The table is given a T-number when it is created, and keeps it for good. Its web address is built from the title, but the T-number is the address to quote: renaming a table deliberately does not change the first one, because every link anybody has already written points at it.
An entry's identity — the thing a citation, an anchor and a search result all point at — is its parameter values. So the set of parameters and their order are fixed once the table is published: changing them afterwards would not break existing citations, it would leave them resolving successfully and pointing at different numbers, which no amount of checking can catch. Their types, constraints and display can be changed at any time, since none of those enters an identity.
Most tables should have code that can recompute their entries; it is the difference between a number a reader can check and one they have to take on faith. Install the numberdb package, write a generator, and send its results with an API key:
#In SageMath. The plain `import numberdb` works too, but then zeta() and
#RealIntervalField() are not there to call.
import numberdb.sage as numberdb
class Zeta(numberdb.Generator):
table = 'T42'
parameters = ('n',)
type = 'R'
def enumerate(self, limit=1000):
for n in range(2, limit + 1):
yield {'n': n}
def value(self, params, digits):
#Sage builds interval fields in BITS; numberdb counts DIGITS.
return RealIntervalField(numberdb.bits(digits))(zeta(params['n']))
Zeta().verify() # is the table still right?
Zeta().preview() # is this generator right? computes all, sends nothing
Zeta().publish() # send the entries
Writing it as a function of one entry's parameters, rather than as a script
that computes everything, is what makes the other three things possible:
extending the table is the same call with a larger bound, recomputing it to
greater precision is a larger digits, and checking it can
sample ten entries instead of regenerating a table that may take days. A check
that takes seconds is a check that gets run.
Writing through the API needs a track record: a few edits that reviewers have accepted. A person editing one table exercises judgement about it; a program does not, and writes faster than anyone can read.
Format of a table
A table is written in YAML, as a set of named sections. Only Title and the entries are required; everything else is there when it has something to say.
Title: Zeros of the Riemann zeta function
Definition: >
The imaginary parts of the nontrivial zeros of $\zeta(s)$.
Parameters:
n:
type: Z
constraints: $n \geq 1$
display: $n$
Data properties:
type: R
complete: no
sources:
- CITE{Odlyzko}
Numbers:
- params: {n: '1'}
number: 14.134725141734693790457251983562470270784257115699243175685567460149?
comment: the first zero
- params: {n: '2'}
number: 21.022039638771554992628479593896902777334340524902781754629520403587?
Each entry is a record: params saying which entry it is, a
number, and anything else you want to say about it. The parameters
are named in every entry, which is what makes a citation stable —
an identity that depended on the order they happen to appear in would still
resolve after somebody reordered them, and would point at a different number.
A value is always text, never a bare decimal. YAML would read
3.14 as a floating-point number and hand back whatever the nearest
one is, which is a different number from the one you wrote. The same rule is
why complete: no means the word "no": YAML 1.1 would read it as
false.
Real numbers are written with a ? on the end, marking the last
digit as uncertain: 3.14159? is a value known to lie in that range,
not a claim that it stops there. Complex numbers are written
a + i * b, with the i first — an imaginary part
can run to a hundred digits, and wherever a value is shown abbreviated the
beginning is what a reader sees, so that is where the marker belongs. Exact
values — integers, fractions, polynomials — are written out in full.
| Title | Required. Renaming a table does not change its address. |
|---|---|
| Definition | What these numbers are, in a sentence or two. LaTeX is allowed anywhere prose is. |
| Parameters | The names, in the order the entries use them, each with a type, optional constraints and how it is displayed. |
| Numbers | The entries. Called Data in a few older tables; both are read. |
| Data properties | type, complete, sources, reliability. |
| Display properties | How the table is laid out — number-header, group parameters. |
| Comments, Formulas, References, Links, Keywords, Tags, Similar tables | Prose and pointers. CITE{key} refers to a reference, HREF{Table_name} to another table. |
Data properties: type says what the values are:
| Z, Q | integers and rationals — exact, written in full |
|---|---|
| R, C | real and complex numbers, to a chosen precision |
| Qp | p-adic numbers, carrying their precision as O(p^k) |
| Z[], Q[] | polynomials — exact |
A parameter's type may also be Symbolic, for one whose values are
names rather than numbers: Co1, unit-s,
a_n/n!.
A hundred significant digits, and up to about a thousand entries, is what a
typical table holds. Neither is a hard rule, and going over is fine when there
is a reason — a complete family that happens to be larger, or digits that
were expensive to compute. Say the reason in a Size exception line
under Data properties and nothing more is asked.
A hundred digits is the suggestion because cheap digits carry no information:
anybody who wants the thousandth digit of a value that evaluates in a second can
compute it themselves, and a hundred is far more than enough to identify a
number, which is what this database is for. Digits earn their place when they
were hard to get. A table that says it is complete is never asked
to justify its size, since truncating a complete table does not make it smaller,
it makes it wrong.
The ID is not part of the document. It belongs to the table, is
allocated when the table is created, and is ignored if you type one. You will
see it at the top of the exported file, where it is put back so the file can be
read on its own.
Unknown keys on an entry are kept and shown, so the format can carry something
new without waiting for anybody to permit it — that is how
proof, url and both signs came to exist.
A key that is nearly a known one, like numbr, is refused instead,
because a misspelt number is not a note about the entry, it is a
value that would silently vanish.
Frequently asked questions
-
Why do I need to specify the period in the real number search?Because the period is even more significant than the highest digit. In principle, one could implement a search of real numbers by their first few digits without the knowledge of the period; however this would ask for numbers up to powers of 10, which does not seem natural enough in general. We implemented a search by the fractional part, as it does not depend on the base.
Work in progress
NumberDB is in active development, and the β beside its name is meant literally: things still move. Since this list was first written, most of it has been built. Complex numbers and p‑adic numbers are searchable; there is an API and a Python and Sage package; tables are edited here on the site rather than through pull requests, and every table records who changed it and when. What remains:-
More numbers and tablesThe aim is around 10 000 tables of around 1000 numbers each — some 107 numbers, which can still be searched by ten digits. There are currently rather fewer, and which numbers are chosen is decided by their simplicity and significance. Contributions are greatly welcome.
-
Search results ordered by significanceAt present a search returns what matches, not what you most likely meant.
-
Rating and watchingEvery table now has a discussion, linked beside its title, for asking where a value came from or why one looks wrong. What does not exist yet is any way to rate a table, or to be told when one you care about changes.
-
Reproducing a table from its own recordA table carries the program that produced it, and can be downloaded whole. It is not yet true that every table's program can simply be re-run to rebuild it — some were made by scripts that predate this arrangement.
-
Saying how well every table's digits are knownTwo tables so far state whether their digits are proven, checked or assumed. The other hundred and five do not, and until most of them do the statement is hard to read: an absent line should mean "nobody has established this", and it cannot be told apart from "not applicable" while it is the common case.
Licence
The data in NumberDB is licensed under CC BY-SA 4.0. Use it, cite it, build on it — credit NumberDB with a link to numberdb.org or to the table you used, and share what you build on the same terms.If a use of yours cannot meet the ShareAlike condition — a textbook whose publisher cannot relicense the whole book, or a dataset that must be CC0 to be accepted elsewhere — write to info@numberdb.org. We would rather arrange something than refuse.
Contributions are covered by the Contributor's Licence Agreement. You keep the copyright in what you write, it is published under CC BY-SA 4.0, and you are credited above.
The software is separate: the website is GPL-3.0-or-later, and the numberdb package is MIT.
Some content comes from elsewhere and keeps its own terms. Sequence names from the On-Line Encyclopedia of Integer Sequences are © the OEIS Foundation Inc., licensed CC BY-SA 4.0. Values drawn from Wikipedia are numerical facts, which carry no copyright, and are stored with a link to the article they came from.
List of contributors
| Contributor | Number of table edits |
|---|---|
| Benjamin Matschke | 282 |
| zeta3[bot] | 95 |
| Eran Assaf | 3 |
| Alex J Best | 1 |
Acknowledgements
NumberDB is built on, and runs on, various open-source projects. The mathematics is done by SageMath, Pari/GP and arb, whose interval and ball arithmetic is what lets a number be stored with its accuracy rather than as a decimal that means nothing in particular. The site itself is Django and PostgreSQL, with Gunicorn, nginx and Docker, certificates from Let's Encrypt, accounts by django-allauth, and NumPy, PyYAML and git underneath. Formulas are set by MathJax, code is coloured by highlight.js, and the type is Source Sans Pro — all three served from this site, so that reading a page here tells nobody else that you did. NumberDB's repositories are stored on GitHub.Parts of NumberDB's code and documentation were written with the help of AI coding assistants — in particular Claude Code and Codex CLI, and the language models behind them — always under human review. Responsibility for the code, and for the mathematics, rests with the developers.
NumberDB's server is funded by the main developer Benjamin Matschke.