This site is supported by donations to The OEIS Foundation.

Talk:Style Sheet

From OeisWiki

Jump to: navigation, search


Standard mathematical notation for multiplication

I think no "absolute" rule is yet established for notation of multiplication in formulae. IMHO, the asterisk " * " is an artifact of programming languages and definitely not the symbol used by humans (and in other scientific journals) to denote multiplication (usually denoted by absence of a symbol, especially in a case like "3n+1" but also (a+b)(a-b) = a²-b²). So I'm slightly in favor of writing formulae without the " * ", at least in the before mentioned case -- even if I admit that it can be handy to be able to make a copy-paste of the formula into the PARI or Maple window... In case of doubt (i.e., absence of a strict rule for which consensus has been reached), the original author's choice should be preserved, IMO. But this is probably not the opinion of everyone, and other points of view could be defended here. — M. F. Hasler 23:36, 29 November 2010 (UTC)

When I thought we were going to have a complete change-over to the wiki, I would have agreed that the asterisk should be reserved for the program (e.g., Maple, Mathematica) fields. Alonso del Arte 00:30, 30 November 2010 (UTC)
That's my feeling as well. Charles R Greathouse IV 07:46, 5 February 2011 (UTC)

I regret the insistence on the ugly asterisk by some editors. Although the style sheet says: "Both 6n^2+17n+1 and 6*n^2+17*n+1 are acceptable." Some editors with a strong programming background flood the OEIS with asterisks. This is not the way every pupil learns to write a multiplication past elementary-school, a teacher uses multiplication on the blackboard or a professional writes in papers.

Don Knuth often uses Mathematica and one of the reasons he likes Mathematica is that it does not force him to write those '*'s.

I like Shaw's "Do not do unto others as you would that they should do unto you. Their tastes may not be the same." A general guiding principle like "The notation should follow as close as possible to the standard mathematical practice" together with respect for other tastes might also be a good idea. As seen here: "Both 6n^2+17n+1 and 6*n^2+17*n+1 are acceptable." Peter Luschny 12:11, 16 September 2011 (UTC)


Excellent! This section is very important and necessary. Neil writes: "This is not essential, since the same information is available in the History section, but it is useful for the reader who is in a hurry." In my opinion, the most important page of an encyclopaedia is usually the final page of the entry, where we should be able to read the available informations about the entry. Also I think that the "History" section, between various changes and corrections, it could become difficult to read in future. Thanks all for this great work! - Bruno Berselli 09:44, 30 November 2010 (UTC)

Neil writes: "Multiplication sign: use * rather than X or ×. Both 6n^2+17n+1 and 6*n^2+17*n+1 are acceptable". Thanks for this clarification. Bruno Berselli 13:17, 08 December 2010 (UTC)

Lines ending in period or not

I wonder whether it is on purpose that the "LINKS" lines are not terminated by a period ".", while "REFERENCES" are, same for EXTENSIONS vs AUTHOR. (Since it is rather AUTHOR which only consists in name + date, while EXTENSION usually is a phrase, one might have expected the opposite convention.) — M. F. Hasler 10:34, 7 December 2010 (UTC)

Is it possible to add a specific entry requesting to add a period to all items name, formulas, examples; comments, crossrefs, ... There are too many new contributions that lack a period. --Michel Marcus 07:16, 1 December 2014 (UTC)

gamma, Pi, phi (or tau), ... (lowercase or uppercase?)

Is there a general rule (or is it ad hoc) for the case of name of constants?

Although 3.14159... is represented by the lowercase Greek letter \scriptstyle \pi\, (not \scriptstyle \Pi\,,) in the OEIS we use Pi (instead of pi) as the latinized version of the name.


A001620 Decimal expansion of Euler's constant (or Euler-Mascheroni constant) gamma.

A001622 Decimal expansion of golden ratio phi (or tau) = (1 + sqrt 5 )/2.

lowercase gamma, phi (or tau) is used... — Daniel Forgues 07:42, 12 December 2010 (UTC)

I think the use of "Pi" instead of "pi" is an artifact coming from programming languages, and hope (and expect) it will disappear one day, sooner or later (probably rather the latter...).
That might be from the day on where unicode is allowed, then we will use the symbol π, as well as the symbol × instead of "X" (quite ugly, IMO, and I'd strongly prefer "x" whenever there can't be an ambiguity). — M. F. Hasler 12:18, 26 January 2013 (UTC)

Zeroeth or zeroth

Is "zeroth" better in:

The zeroeth (also spelled zeroth) power of 0 (The special case of zero to the zeroeth power.) — Daniel Forgues 06:01, 13 December 2010 (UTC)

AFAICS, it should be zeroth, cf. and — M. F. Hasler 02:41, 26 November 2012 (UTC)

Minimum number of terms

I think I've seen before that it is 4 terms, is that right? — Daniel Forgues 05:39, 19 December 2010 (UTC)

Generally, yes. A quick search through stripped.gz shows a number that have 3, 2, or even just 1 term:
1 term: A058445, A058446, A072288, A076337, A082710, A115453, A118329, A122036, A144134
2 terms: A001220, A003847, A003854, A003936, A003937, A003943, A003944, A008869, A008870, A010332, A014127, A014136, A020329, A028446, A050920, A058433, A058434, A058453, A058454, A058471, A058472, A062595, A062626, A062638, A062644, A062651, A062659, A062663, A062665, A064117, A081208, A081357, A082813, A088164, A100351, A101571, A101734, A101846, A102910, A102997, A103479, A103504, A107646, A110018, A111027, A114432, A118019, A119333, A120377, A122421, A122557, A122650, A123155, A123693, A126432, A130682, A131960, A132642, A133858, A135240, A135442, A137599, A138763, A138790, A139410, A139775, A139777, A140171, A144587, A144588, A145276, A145277, A145744, A153433, A154110, A154998, A158664, A158750, A167842, A171266, A173377, A173418, A176024, A176935, A178329, A178812, A178900, A179128, A179144, A179161, A179172, A179173, A179174, A180247
3 terms: 370 sequences
But 4 terms is usually the minimum.
Charles R Greathouse IV 07:56, 5 February 2011 (UTC)
If one term is enough, then I wonder whether I should submit the "sequence"
Odd spoof perfect numbers: 198585576189Daniel Forgues 01:08, 6 February 2011 (UTC)
The thing is, a search for 198585576189 gives more than one result. A search for 316912650057057350374175801344000001 gives only one result (the aforementioned A072288—or maybe that sequence should be changed to 1429, 1129, 29 or 53, 427169, 5501, 19, 59, 1327, 1645318771, 61, 211, 17, 1831 and have 316912650057057350374175801344000001 given in a comment). Alonso del Arte 01:23, 6 February 2011 (UTC)

Templates for references

I tried some time ago to get the the following Wikipedia templates

Template:Citation/core, Template:Citation/core/doc,
Template:Citation, Template:Citation/doc,
Template:Cite arXiv, Template:Cite arXiv/doc,
Template:Cite book, Template:Cite book/doc,
Template:Cite journal, Template:Cite journal/doc,

to work within the OEIS, but they are dependent on so many other Wikipedia templates that it is not easy to disentangle from Wikipedia...

I will work some more on them (any help on those would be great too, although I'm almost done now) and if I don't succeed on disentangling those templates then I will have to start from scratch. Also, we would need to get approval from Neil Sloane and David Applegate before starting using them, in case they have other plans (there are many different referencing conventions.) — Daniel Forgues 02:20, 20 December 2010 (UTC)

Now, using the "Cite journal" template, as

{{Cite journal  
| author = Hassani, Mehdi
| title = Derangements and Applications
| publisher = Journal of Integer Sequences (JIS), Volume 6, Issue 1, Article 03.1.2, 2003
| url =


Hassani, Mehdi. Derangements and Applications. Journal of Integer Sequences (JIS), Volume 6, Issue 1, Article 03.1.2, 2003. 

where I have to deal with the missing template (not missing anymore)

Template:Citation/make link

and it is not quite yet working... — Daniel Forgues 03:16, 20 December 2010 (UTC)

Almost working (only that spurious link at the end...) — Daniel Forgues 08:38, 20 December 2010 (UTC)

Wikipedia uses the "Cite web" template (so I'll bring that one into the OEIS (that's now done)) ("Cite journal" must be for traditional printed journals...)

{{Cite web  
| author = Hassani, Mehdi
| title = Derangements and Applications
| publisher = Journal of Integer Sequences (JIS), Volume 6, Issue 1, Article 03.1.2, 2003
| url =

which gives

Hassani, Mehdi. "Derangements and Applications". Journal of Integer Sequences (JIS), Volume 6, Issue 1, Article 03.1.2, 2003. 

and it will work (if I succeed...) once I bring it in the OEIS (which I'll do right now.) ... — Daniel Forgues 03:31, 20 December 2010 (UTC)

Almost working now (the title works as a link, have to get rid of link appearing at the end...) — Daniel Forgues 04:02, 20 December 2010 (UTC)

Trying the "Cite book" template, as

{{Cite book
| last = Mumford
| first = David
| authorlink = David Mumford
| title = The Red Book of Varieties and Schemes
| publisher = [[Springer-Verlag]]
| series = Lecture notes in mathematics 1358
| year = 1999
| doi = 10.1007/b62130
| isbn = 354063293X


Mumford, David (1999). The Red Book of Varieties and Schemes. Lecture notes in mathematics 1358. Springer-Verlag. doi:10.1007/b62130. ISBN 354063293X. 

almost works (but needs Template:Citation/identifier, one more dependent template needed, which I'll bring in... it's now done) — Daniel Forgues 04:11, 20 December 2010 (UTC)

Cite book works properly now! — Daniel Forgues 08:38, 20 December 2010 (UTC)

Trying the "Cite arXiv" template, as

{{Cite arXiv 
| last = Sparling 
| first = George A.J. 
| eprint = gr-qc/0610068 
| title = Spacetime is spinorial; new dimensions are timelike 
| year = 2006 
| version = v1


Sparling, George A.J. (2006). "Spacetime is spinorial; new dimensions are timelike". arΧiv:gr-qc/0610068v1. 

which partially works (but needs 2 more templates... it's now done) — Daniel Forgues 04:18, 20 December 2010 (UTC)

Cite arXiv works properly now! — Daniel Forgues 08:38, 20 December 2010 (UTC)

Trying the template "Citation", a generic citation template which tries to determine which specific Cite template to use from parameters used, as

| last = Turner
| first = O.
| title = History of the Pioneer Settlement of Phelps and Gorham's Purchase, and Morris' Reserve
| publisher = William Alling
| place = Rochester, New York
| year = 1851
| url =


Turner, O. (1851), History of the Pioneer Settlement of Phelps and Gorham's Purchase, and Morris' Reserve, Rochester, New York: William Alling .

which almost works (except for that spurious link at the end...) — Daniel Forgues 04:33, 20 December 2010 (UTC)

Cite arXiv works properly now! — Daniel Forgues 08:38, 20 December 2010 (UTC)

Cite book works properly now! — Daniel Forgues 08:38, 20 December 2010 (UTC)

Trying "Cite journal", as

{{Cite journal 
|first=W. Hugh 
|title=The Continuum Hypothesis, Part I 
|journal=Notices of the AMS 
|location=Providence, RI 
|publisher=American Mathematical Society 


Woodin, W. Hugh (2001). "The Continuum Hypothesis, Part I" (PDF). Notices of the AMS (Providence, RI: American Mathematical Society) 48 (6): pp. 567–576. ISSN 1088-9477. OCLC 34550461. 

almost works right (still that spurious link at the end...) — Daniel Forgues 09:55, 20 December 2010 (UTC)

Anybody got a clue why the html link keeps appearing at the end (they don't in Wikipedia...) — Daniel Forgues 10:06, 20 December 2010 (UTC)

Check the following page for usage testing of reference templates:

All the tentative reference templates (obtained from Wikipedia, we need approval from Neil Sloane and David Applegate before using them, in case they want to use a different standard for references)

Template:Cite book
Template:Cite journal (Template:Cite paper as redirect)
Template:Cite magazine (Template:Cite magazine article as redirect)
Template:Cite web
Template:Cite arXiv
Template:Citation (a generic reference template trying to choose the right specific template from parameters used)

work properly if you don't use a URL. If you use a URL, it gets wrapped properly in a link with title as label, but it also appears unwrapped at the end of the line (and it shouldn't, it doesn't in Wikipedia.) This I (or someone else...) still have to fix, but I will need strong coffee to delve into the Template:Citation/core template... which as you guess implements the core functionality shared by all the citation templates. — Daniel Forgues 06:08, 25 December 2010 (UTC)

MathWorld template

The MathWorld template may be modified to get (which I actually do like more)

Eric W. Weisstein, "Derangement," from MathWorld – A Wolfram Web Resource

instead of the current

Weisstein, Eric W., Derangement, from MathWorld—A Wolfram Web Resource. []

Daniel Forgues 07:17, 20 December 2010 (UTC)

Could we leave thet "Wolfram Web Resource" out? — Joerg Arndt 15:20, 13 May 2015 (UTC)

Form of recursion formulae

IMO a Style Sheet entry giving advice concerning the form of recursion formulae is urgently needed. Klaus Brockhaus 20:50, 21 December 2010 (UTC)

  • Base conditions, boundary conditions, recursion equation. In that order, order matters. Example:
For 0 <= n, 0 <= k <= n. 
T(0,0) = 1;
T(n,0) = T(n-1,n-1) if n > 1;
T(n,k) = T(n-1,k-1) + T(n,k-1) otherwise.

Terser, and more computational: 

T = (n,k) -> 
  if n = 0 then 1
elif k = 0 then T(n-1,n-1)
else T(n-1,k-1) + T(n,k-1).


Thus we can state this recursion in one sentence as: The value of T(n,k) is, if n = 0 then 1 else if k = 0 then T(n-1,n-1) else T(n-1,k-1) + T(n,k-1).

A recursion can be thought of as a logical cascade, an ordered list of pairs [[cond_1,val_1],...,[cond_n,val_n]] which is evaluated from left to right. In our example this can be written symbolically as:

  • T(n,k) = Recursion([[n = 0, 1], [k = 0, T(n-1,n-1)], [true, T(n-1,k-1) + T(n,k-1)]]).

This form might be regarded as a terse 'style' to state a recursion. It can be copied and pasted into a CAS like Maple; only minor syntactic adjustments are necessary.

T := proc(n,k) local rec;
rec := '[[n=0,1],[k=0,T(n-1,n-1)],[true,T(n-1,k-1)+T(n,k-1)]]':
Recursion(T,rec,n,k) end:
for n from 0 to 4 do seq(T(n,k),k=0..n) od;
          1, 2
        2, 3, 5
      5, 7, 10, 15
   15, 20, 27, 37, 52

Clearly also recursions on one parameter work this way:

Fact := proc(n) local Q;
Q := '[[n<1,1],[1<=n,n*Fact(n-1)]]':
Recursion(Fact,Q,n,notdef) end:
Fact(4);  24

It is a pity that the developers of Maple forgot those four lines of code which make all this run. So now here they are:

Recursion := proc(U,Q,n,k) local i,S,Rec;
Rec := proc(U,Q,n,k) local i; i := 1;
while not evalb(op(1,Q[i])) do i := i+1 od:
eval(op(2,Q[i])) end: Rec(U,Q,n,k) end:

Peter Luschny 01:12, 22 December 2010 (UTC) —— Peter Luschny 18:03, 22 December 2010 (UTC)

"Authorship" and "Cite this page as" sections at end of all OEIS Wiki pages

Neil Sloane sent me the following email (Feb 1, 2011) regarding "Authorship" and "Cite this page as" sections at end of all OEIS Wiki pages

I do have one important comment,
which applies to all the wiki pages.

It seems to me that since we are a scientific database, pages
should always say who the author is.

Perhaps add two sections towards the end that say something like this:

The first version of this page was written by ...., Dec 45, 1893
Figures were provided by ...
John Smith added the generating functions on Dec ...
Further remarks added by ...

Cite this page as
Daniel Forgues and others,
<a href="">Centered polygonal numbers</a>,
a page in the OEIS Wiki.

(or something like that)

It is true that one might be able to reconstruct the
authorship information
from the History tab, but it is pretty difficult to do so
and will get more difficult as time goes on.
I think all our web pages should have sections like this.

Best regards

Daniel Forgues 05:46, 2 February 2011 (UTC)

What about splitting the article page in two: one for OEIS, one for OEIS Wiki

Style sheet for contributors to OEIS


Style sheet for contributors to OEIS Wiki

The issue in doing so is that we cannot simply do a move, it would have to be via copy and paste, and the edit history would be lost, so I won't do it myself.

Daniel Forgues 16:32, 2 June 2011 (UTC)

Function names

The Guide to Spelling and Notation covers many cases like prime(n), p(n), cos(x). One that just came up in a sequence: Do we write moebius, mobius, möbius, Moebius, MoebiusMu, mu, μ, 𝜇, ...? I tend to use mu but it's probably best to standardize this.

Charles R Greathouse IV 19:03, 10 July 2011 (UTC)

For what it's worth, I'd prefer Möbius mu across the board. However, for now maybe we should compromise to Moebius mu in OEIS Main and Möbius μ in the OEIS Wiki. (Mathematica programs of course keep MoebiusMu). Alonso del Arte 21:04, 10 July 2011 (UTC)
I certainly prefer Möbius to its other spellings (of course outside of contexts like Mathematica and GP where spelling must be MoebiusMu and moebius), but the main question here is how to handle the sequences since the Style Sheet is still recommending against non-ASCII characters. Moebius mu (when referring to it) and mu(n) (when used as a function) are probably best in that context. Charles R Greathouse IV 22:03, 5 September 2011 (UTC)

naming conventions for programs

I don't know whether this is the place to ask the question, but... I remember one "help" page on the old OEIS where s/o (R.J.Mathar?) tried to establish some naming conventions for (Maple(? and other?)programs, e.g., (symbolically):

  • Axxx = n -> a(n) ;
  • is_Axxx = n-> evalb( n in Axxx ? ) ;
  • Axxx_list (or Axxx_vec ?) = N -> [a(n) $ n=offset..N] ;

... [details may be wrong, this is roughly what I recall and/or use]. Any links, ideas, ...? — M. F. Hasler 00:38, 28 October 2013 (UTC)

I have my thoughts at User:Charles R Greathouse IV/Programs#Naming conventions. - Charles R Greathouse IV 05:10, 28 October 2013 (UTC)
I have mine at User:M._F._Hasler/Programs/Naming_conventions... — M. F. Hasler 05:37, 26 February 2014 (UTC)

Operations over ranges

Motivated by a recent pink box discussion: What is the best way to write the expressions below?

  Min(term(k) : start<=k<=end)
  Max(term(k) : start<=k<=end) 
  Sum(term(k) : start<=k<=end)
  Product(term(k) : start<=k<=end) 
  Integral(term(x) : start<=x<=end)
  min(k=start..end, term(k) ) 
  max(k=start..end, term(k) ) 
  sum(k=start..end, term(k) )
  product(k=start..end, term(k) ) 
  integral(x=start..end, term(x) )
  min_{k=start..end} term(k)  
  max_{k=start..end} term(k)  
  sum_{k=start..end} term(k) 
  product_{k=start..end} term(k)  
  integral_{x=start..end} term(x)

Guiding principle: The notation should follow as close as possible to the standard mathematical practice.

(1) Clearly min and max and not Min and Max is mathematical standard; thus (B) and (C) is to be preferred over (A).

(2) The range of application and the index of operation is bounded to the operation symbol; therefore again (B) and (C) is to be preferred over (A).

(3) I prefer (C) over (B) as it is again closer to the mathematical way of writing. It links the range to the operation by writing op_{..}; this way it is also done with TeX.

Moreover it emphasizes that a sum is not an operation with two variables (ranges and functions) but an operator acting on functions; this I believe is more natural. — Peter Luschny 09:50, 15 September 2011 (UTC)

There are many other ways I've seen in the OEIS, perhaps most prominent (of those missing) being
 sum(k=start, end, term(k))
I don't have strong preferences here, but I would prefer a unified standard. I think (B) and (C) are probably my favorites as they re-uses the range operator already used for b-files, giving the encyclopedia a more consistent feel. I suppose I prefer (B) slightly because of the lack of delimiters on the main term of (C).
I concur with Peter on the case (sum not Sum) and feel obliged to point out that parentheses/round brackets, not brackets/hard brackets, should be used.
Disclosure: I write LaTeX which uses (C) and GP which uses (B1).
Charles R Greathouse IV 19:53, 15 September 2011 (UTC)

It was not my intention to list all variants seen in the OEIS. Rather I believe it is important to formulate a guiding principle which goes beyond the specific example here: "The notation should follow as close as possible to the standard mathematical practice." B1: sum(k=start, end, term(k)) is just another example of the way programming languages and styles become more and more predominant in the OEIS; a shift which I attribute more to some editors then to the authors or users. — Peter Luschny 12:07, 16 September 2011 (UTC)

I'd vote for (2) [sic., (B) I think] because of machine-parsing. Also the following should be listed:

sum(k>=0, f(k) )
sum(k>=1, f(k) )

with >= preferred over >. — Joerg Arndt via Charles R Greathouse IV 13:11, 16 September 2011 (UTC)

I concur with Peter's (1) and (2) and (3). As he points out, (C) is the notation used in mathematics in all of the instances (min/max, sum, ...), (B) is the "generic" syntax of programming languages and CAS, while (A) (capitalized function names Max, Sum,...) is a pure Mathematica artefact and as such to be proscribed anywhere outside the "Mathematica" section, IMHO.
In case of sum/product I think (B) is acceptable as practical alternative of the "correct" mathematical notation, since the latter cannot be implemented as it should (domain of the "variable" as subscript) in plain text, and also because the "computational"/procedural idea of computing the sum by adding up the terms, suggested by (B), is natural in the case of sum/product, but not in the case of min/max.
In the case of min/max, my favourite (since close to standard math) notation would be max { f(k) ; k=1..n }, the maximum of a set. If I have to choose between (B) and (C) then I'm more in favour of (C): the TeX style syntax suggests the variable & range below the "max" operator, as is standard math notation. Conceptually we have the max of a set given by enumeration, S = { x1, x2, x3, ... } = { xi ; i=1,2,3... } = { x(i) ; i ∈ N }. The only argument that "explains" the notation max(x=1..N, f(x)) is the analogy with sum(...), but here it is rather an artefact of a probably inefficient computation of that maximum.
The alternative notation: max(x(i), i=1..n), not proposed above, could be seen as "functional/programming style" writing of max {x(i) ; i=1,2,3,...}. (In favour of this speaks also that the "main information", namely the general term of the sum, is given before the "detail" which is the upper and lower limit, which can often be tacitly understood.)
Summarizing, I'd say the situation is different for min/max which operate on sets, while sum/prod naturally operate on sequences (= functions of the index). The notation (x(i), i=a..b) could be seen as representation of a correct mathematical notation in both cases. M. F. Hasler, 03:26 UTC, 26 November 2012, reworded 8 March 2014 and 14 May 2015.

Function names: LCM and GCD

  • Write lcm in formulas (not LCM)
  • Write gcd in formulas (not GCD)

For example on Wikipedia all occurences of lcm and gcd in formulas are written with lower case letters. (See links below.)

Upper-case letters (LCM and GCD) are only used as an abbreviation in the text.

  • For example, the GCD of 8 and 12 is 4.
  • gcd(8,12) = 4.

Another example: A199806 Alternating LCM-sum: a(n)=sum_{k=1..n} (-1)^(k-1)*lcm(k,n).
And not, as it is: A199806 Alternating LCM-sum: a(n)=sum_{k=1..n} (-1)^(k-1)*LCM(k,n).

Wikipedia LCM Wikipedia GCDPeter Luschny 23:47, 10 November 2011 (UTC)

Any guidance on GCD as opposed to gcd? The former seems to be more prevalent in the OEIS. (This of course is irrelevant for computer programs—Mathematica requires the former and PARI apparently the latter). Alonso del Arte 20:24, 16 September 2012 (UTC)

See the first table on this mathworld page: Graham, Knuth, and Patashnik, Concrete Mathematics, as well as Bressoud and Wagon, Course in Computational Number Theory, as well as Bronshtein, Semendyayev, Musiol, and Muehlig, Handbook of Mathematics, use gcd. This settles this question for me. Peter Luschny 16:22, 17 September 2012 (UTC)

If no one has any objections, I'll go ahead and put your proposals into the Style Sheet. Alonso del Arte 17:51, 17 September 2012 (UTC)
I happily agree! Thanks for the help in defending traditional mathematical notation! — M. F. Hasler 02:50, 26 November 2012 (UTC)

Different/Not equal

In the "Spelling and notation", is it possible to add a line concerning the way(s) it should be rendered: <>, !=, =/=, ... ? --Michel Marcus 07:21, 1 December 2014 (UTC)

GLB or glb, LUB or lub

Greatest lower bound: GLB or glb? Least upper bound: LUB or lub?

Do we use glb and lub to be consistent with the convention for gcd and lcm.— Daniel Forgues 17:33, 17 October 2015 (UTC)

Is the information about b-sequences partly obsolete? (Answer: no!)

(I am fairly new to the editing side of the OEIS. Perhaps the following is a stupid and unnecessary question, since the answer would be immediately clear, if I read other information. If so, I'd appreciate a hint of where to read this.)

In some of the style sheet sections, b-files are mentioned as an option, where more entries could be added. In Style Sheet#Sequences with conjectured terms, there seems to be an explicit recommendation to list fully verified values of a(n) in a b-file, even if there are some m<n for which a(m) is unknown:

  • More than enough terms are known to fill three lines in the Data section, but there are gaps further along in the sequence. In this case we give the known terms in a b-file, and all the terms - with gaps, question marks, or ranges for the uncertain terms - in an a-file. Example: A072942, which has both a b-file and an a-file. A046057 is a sequence from group theory which has an a-file although we don't know enough terms for certain to give a b-file.

However, the example A046057, which is said to have no b-file, does have one, marked (b-file synthesized from sequence entry). Most b-files I've looked at were so marked. I found no example at all of a b-file containing non-contiguous entries, not even for the example A072942. Thus, the b-file for that example does not contain "the known terms", as claimed, just the terms up to the first gap.

Thus, I have several questions:

  1. Is the existence of "synthesized" b-files making the discussion about examples where "we don't know enough terms for certain to give a b-file" obsolete?
  2. Is there some unwritten rule that b-files never should contain an entry a(n), if there is an integer m strictly between the offset and n, for which a(m) is not known; or should the b-file contain also such items, if they are well within the "260 bytes" limit (converted to A-format)?
    An example is A159847, containing just 21 reasonably small entries (since a(22) and a(23) are unknown). The accompanying comments contain the information that a(24) = a(32) = a(50) = 1; but the b-file is auto-generated, and only contains the 21 first items. Should the other three items be added to the b-file, or not?
    Gaps should be more the rule than the exception for sequences formed by reading twodimensional tables diagonally, I suppose.
  3. Is there a risk that a new auto-generated b-file replaces an old one, deleting some manually entered a(n) for n above the lowest gap, if the A-table itself is extended; or is the auto-generation not working in such cases?
    In the example: If the three higher a(n) are entered into the b-file, will they be lost, if a(22) (but not a(23)) is added to the main sequence?

I hope that the questions are clear enough to be answerable. Jörgen Backelin 02:16, 1 November 2015 (UTC)

Response from N. J. A. Sloane 19:48, 1 November 2015 (UTC): Let me try to clarify some things.

  • The official description of a b-file is here:
  • You say: "there seems to be an explicit recommendation to list fully verified values of a(n) in a b-file, even if there are some m<n for which a(m) is unknown". No, that's not true. The b-file must contain only terms that are known to be correct, and with no gaps. If there are uncertain values, then you should create an a-file.
  • If sequences don't have a b-file, the OEIS operating system with automatically create a "synthesized b-file" as a substitute. This is obtained by making a temporary b-file from the terms in the DATA section.
  • I hope this has answered your questions.
Thank you for the answer, and for the reference!
However, I think that there could be more "newbies" than me who would tend to interpret "the known terms" as meaning "the terms we know for sure, whether or not they are preceeded by gaps". After all, until I followed the link you provided, I found it quite reasonable to interpret the instructions in the Style Sheet to mean that a correct b-file for A159847 would end
19 1
20 1
21 3
24 1
32 1
50 1
("containing all known terms", and just ignoring the gaps).
Therefore, I would suggest that the Style Sheet text be clarified by writing
In this case we give the known terms (up to the first gap) in a b-file, and all the terms - with gaps, question marks, or ranges for the uncertain terms - in an a-file.
(where the suggested addition is underlined). Jörgen Backelin 20:19, 2 November 2015 (UTC)
Response from N. J. A. Sloane 17:29, 6 November 2015 (UTC): Thank you for that excellent suggestion. I have modified the Style Sheet accordingly.

Test your programs!

Something I'd like to add to this Style Sheet: test your programs! Unless you're copying directly from the relevant application immediately following a successful run, copy and paste from the OEIS to the application and execute. That way you might catch some silly tiny mistake like Fiboncaci[n] that causes your program to give nothing besides an error message. - Alonso del Arte 22:05, 1 January 2016 (UTC)

References vs. Links

During recent edits it came again across my mind that it might be better if we allowed HTML (i.e., links) also in the REFERENCES section, and left in the LINKS section only material which does not correspond to published papers. (In particular, since actually nowadays almost every [even old] paper has a link to it.) I don't know where else this could be discussed, so I put it here, hoping s/o will see it. MFH 21:16, 25 May 2017 (UTC)

For a link I expect a clickable URL: no subscription, no paywall, and ideally not only an abstract. For a reference I expect trouble like books, journals, and other things outside of open access. –Frank Ellermann 08:27, 11 October 2017 (UTC)


I would suggest clarifying that users should label the version in the code when appropriate. I mention this after finding ~ 642 fairly recent entries using function xrange, which works in Python2 but not Python3. I am unsure if "range" is a direct replacement.--Bill McEachen 14:21, 17 December 2017 (UTC)

Different versions of scripting languages might be slightly out of scope for OEIS, and the range vs. xrange-issue is apparently not too bad. –Frank Ellermann 17:50, 18 December 2017 (UTC)
Personal tools