This site is supported by donations to The OEIS Foundation.
The comments field in OEIS sequence entries is for information that does not quite fit in other fields. Except for comments made by the original submitter at the time the sequence was sent in, comments have the name and date of the commenter right at the end. For example:
comments In 1968, Gutierrez proved this sequence is infinite, see Tao (1977) paper. - John Smith, Jan 01 2010
First sign change occurs past a(10^35). It is believed this sequence changes signs infinitely often. - Peter Kopf, Jul 07 2011
OEIS sequence entries have a Comments field for comments. A statement like a(n) = f(n) + n^2 if n is odd would be more appropriate in the Formula field, while a remark like Julia Woods helped me find a(17) and a(18) would be more appropriate in the Extensions field. (The Smith example above presupposes the References field includes a citation of the Tao (1977) paper).
Comments in computer programming or scripting language source code are remarks meant for humans looking at the source code, which the parser strips out before sending to the compiler or interpreter. Comments are a good idea for any source code anyone might need to look at in the future, and only the shortest and most self-explanatory programs may dispense with them.
Programs included in OEIS sequence entries are generally quite short and self-explanatory, but we have some other uses for comments:
- To give the name of the author of the program, if not the same as the author of the sequence (or if the author of the sequence adds a program after initial approval).
- To indicate a package or library needs to be loaded.
- To indicate a need for a specific version of a CAS or a need for a substitution (e.g., a built-in command was not introduced until version 5.0, or version 7.0 changed the meaning of a symbol).
- To indicate a program for another sequence needs to be run first (e.g., before you can run the program for A250143 you need to run the program for A241035).
OEIS users are smart enough to know that a string like
- John Lopez, Jul 08 2005 is not something that they should copy and paste into their CAS, as the CAS will complain that
John Lopez is an undefined symbol. But it is a nice convenience if they can just copy and paste everything from after prog
(software name) to the end of the line. Another format you might sometimes encounter in older sequence entries goes something like this:
[John Lopez, Jun 07 2006]
Often the end of line is a finish comment delimiter, generally when the start comment delimiter is a single character; the comments are then single line and a new start comment delimiter is needed on the next line if the comment needs more lines. Unless of course a multi-line syntax is available: those often employ pairs of characters bearing some symmetrical relationship (e.g.,
\* comment *\), with the choice of characters being a combination that would not otherwise occur (
+= comment =+ would be an unacceptable syntax for comments in C++ since
+= signifies addition and assignment). The distinction between single and multiple line comments in programs for OEIS sequence entries is generally a purely academic one.
The following table shows the comment syntax for the software packages most commonly used by OEIS contributors: