Entries in the The On-Line Encyclopedia of Integer Sequences give at most three lines of terms
(about 200 characters - a carry-over
from the days when the database was on punched cards).
Often one wants more terms than this, so many sequences now have
"b-files", giving 10000 or more terms.
The format for a b-file is:
with one line per entry.
This is a list of pairs "n a(n)",
where n starts at the correct offset for the sequence
and a(n) is the n-th term.
n should begin at the left then a single space then a(n). No commas.
When you edit a sequence, in the Links section you will see
a place where you can upload a b-file, or other file that
is to be associated with this sequence.
Note that you must log in before you
can see the "Edit" tab for a sequence, and
you must register
before you can log in.
The name of the b-file for A123456 (say) would be b123456.txt
The above example is the file
for the primes, A000040.
For other examples see the b-files for the
Fibonacci numbers A000045,
The values of n should start with the offset of the sequence
(this is the first number in the Offset line in the entry).
Lines beginning with # are comments lines and are ignored.
Blank lines are also ignored.
The b-file for a triangle of numbers is obtained by "flattening"
the triangle - for example, see the
for Pascal's triangle
When you upload a b-file, you must also create a link to it,
which will be added to the sequence entry.
If you don't create a link, no one will ever see the b-file.
When you upload the file, you will see a template for the link that you can edit.
The MIN and MAX values will be automatically filled in by the system.
Examples of links:
T. D. Noe, <a href="b001620.txt">Table of n, a(n) for n=0..2000</a>
M. F. Hasler, <a href="b139080.txt">Table of n, a(n) for n=1,...,10000</a>.
T. D. Noe, <a href="b047999.txt">Rows n=0..50 of triangle, flattened</a>
Each pair n, a(n) should be on a single line, even if a(n) is very large.
But a(n) should not have more than about 1000 digits, or some
of the programs will fail.
For an example with large entries, see the
You will be warned if the b-file does not agree with the existing terms in the Data section. (If there was an error in the sequence, it must be corrected before a b-file can be uploaded.)
The offset in the b-file must also agree with that of the sequence.
(If the offset is wrong in the sequence, that must be corrected before the b-file can be uploaded.)
If possible, please use spaces rather than tabs to separate the two numbers on each line. The b-file should be in plain ASCII, not UTF-8, say.
(The b files have a strict format; byte order marks are not allowed.)
If you extend a b-file by adding more terms, you should replace the author's name(s) with your name, and after the link, add a comment such as (terms 1..500 from Jon E. Schoenfield, terms 501..1000 from Chai Wah Wu).
Here is an example:
Lars Blomberg, Table of n, a(n) for n=1..12000 (terms 1..500 from Jon E. Schoenfield, terms 501..1000 from Chai Wah Wu).
So that other people can verify your work, if possible please include the program that you used to compute the b-file. Put the program at the head of the b-file, with a # at the start of each line (so that these lines are ignored by the graph command).
If your program is too long for this to be convenient, please include it as a separate text file attached to the sequence, with a name like a123456_Maple.txt or a234567_Py.txt.
Question: Is there a rule of thumb for which sequences we want b-files for?
Amswer: Pretty much any sequence - the b-files are always useful.
Question: I would think that sequences that are too simple (like the odd numbers) would be excluded.
Answer: No, even the odd numbers have a b-file
(useful for plotting one sequence against another, for example).
Question: what size of b-file is acceptable?
Answer: 100, 1000, 10000, 20000 terms are usual.
But remember that the numbers cannot have more than about 1000 digits, or some
of the programs will fail.
Question: I have computed more terms for a sequence, but there
are gaps in the table. Can I still send in a b-file?
Answer: No, the b-file cannot contain gaps.
The values of n must be consecutive.
Send in an a-file instead - see below. In an a-file you can
put question marks for the missing entries.
There is no special format for an a-file.
Uploading other files associated with a sequence
The same "upload" mechanism can also be used to upload
other files that are to be associated with a sequence.
Files to be associated with sequence ANNNNNN should always start
with aNNNNNN, with a lower-case a (except for b-files, which are
Be sure to create a link for each file.
The allowed file extensions for text files are .eps, .nb, .ps, .rtf, .svg, .tex, .txt
But any text file is okay; if it doesn't have one of the above extensions,
then it gets .txt added. For example, it's fine to upload
prog.tex; it will get saved as aNNNNNN.tex. It's also fine to upload
prog.c; it will get saved as aNNNNNN.c.txt. The fact that .tex is on
the list and .c is not only affects whether .txt gets added.
For binary files, the allowed formats are: pdf, gif, jpg, png, tiff.
Typical examples of files that might be uploaded are:
A Maple or or other program that is more than a few lines long.
The file name might be a123456.map.txt or a123456.cpp.txt.
A file a123456.txt which would otherwise be a b-file (see above), except that perhaps some entries are not known or exceed 1000 digits. It is quite reasonable to have both a b-file and an a-file for the same sequence.
A large table which displays several sequences side-by-side.
A drawing (aNNNNNN.jpg, say) that illustrates the first few terms of the sequence.
Thousands of people use the sequence database every day.
Please take great care
what you send is absolutely correct.
The standards are those of a mathematics reference work.
Contributions are contributed under
The OEIS Contributor's License Agreement,
and may be edited, altered, or
removed by other contributors.
If you do not want your writing to be edited mercilessly, then do not
submit it here.
You are also promising us that you wrote this yourself, or copied it from a
public domain resource,
or have the right to submit it (see
The OEIS Contributor's License Agreement for details).
Do not submit copyrighted work without permission!