This site is supported by donations to The OEIS Foundation.

Talk:Style Sheet/Archive

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 (not ,) 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)

Resolved later, see Style Sheet for OEIS Wiki. –Frank Ellermann 22:25, 1 February 2018 (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.