This site is supported by donations to The OEIS Foundation.



Style Sheet



From OeisWiki

This is a quality version of this pageThis is the stable version, approvedon21 June 2024.
 Readability: Approved  


Jump to: navigation, search
 


Style sheet for contributors


Contents

Style sheet for contributors to the OEIS

Format of entries in the OEIS

Entries in the OEIS have a rigid format. Each entry contains some or all of the following fields.

A-number

The A-number is an A followed by six digits (until we reach A999999). Example:

A005132

Name

This gives a brief description or definition of the sequence. Example:

The even numbers.

Data

This field gives the beginning (at least 4 terms) of the sequence. Example:

1, 1, 1, 2, 3, 5, 9, 32, 56, 144, 320, 1458, 3645, 9477, 25515, 131072, 327680, 1114112

Offset

The index of the first term of the sequence.

Comments

Relevant information that would make the sequence name much too long and interesting side facts that don't fit in the other fields.

References

References to books, journal papers, and other material not found online.

Links

Links to journal papers, preprints, illustrations, web pages, and other material:

Links containing hidden programs:

Formula

Formulas for calculating the n-th term of the sequence, generating functions, asymptotics, and so forth.

See section #Spelling and notation for preferred notation of mathematical formulae. In decimal expansions a formula Equals formula is about the constant, not about the decimal digits a(n).

Example

An example of how to find or interpret terms when it is not obvious.

Maple

A Maple program.

Mathematica

AWolfram Mathematica program. For much more about Mathematica programs, see Style sheet for Mathematica programs.

Programs

A program in some language other than Maple or Mathematica.

Code should be signed unless it was written by the sequence author as part of the original submission. To allow the program to run in case the signature is copied, the signature should be in a comment. The preferred formats for such comments (in languages frequently used in the OEIS), where the block ~~~~ will be automatically replaced by the user's name and the current date, are:

Signature Languages
# ~~~~ GAP, Julia, Maple, Perl, Python, R, Ruby, SageMath
/* ~~~~ */ C, Java, Maxima, PARI, Rexx
// ~~~~ C++, Java, Magma, MuPAD, Pascal, Rust
(* ~~~~ *) ARIBAS, Mathematica, Pascal
' ~~~~ BASIC
c ~~~~ Fortran (with the "c" at the start of a line)
-- ~~~~ Haskell
NB. ~~~~ J
% ~~~~ MATLAB (with the "%" at the start of a line)
\\ ~~~~ PARI

It is no longer necessary to replace leading spaces with dots, for languages that require indentation: as soon as a line starts with two spaces or more, they will be preserved.

Note that code in the Wolfram Language belongs in the Mathematica section, not here, regardless of whether it is executed in Mathematica or Wolfram Alpha, and that code in the Maple language belongs in the Maple section.

Cross-references

Cross-references to related sequences. This should be a comma-separated list of sequence numbers without repetition, with a space after each comma.

Keywords

One or more of a fixed set of standardized keywords. For more information, see the official descriptions of keywords, clear-cut examples of keywords, or an essay on keywords (advanced).

Author

The author's name and the date of initial submission. Sequences with multiple authors should have multiple names here. This field generally does not change once the sequence is first approved.

Older sequences may also include the author's email address; when possible, the author's name should be linked instead.

This field generally represents the person submitting the sequence, even if the sequence was known earlier. For example A000040, the prime numbers, were known long before they were entered in the OEIS, but the author is still listed as N. J. A. Sloane.

Extensions

This field is to claim credit for additions to the entry that can't be properly acknowledged in other fields. The most common use is to acknowledge more terms for sequences that had only a few previously, e.g., "a(10)-a(24) from _Jan Schuster_, Mar 14 2015".

Status

A non-editable field that shows the status of the sequence: approved, editing, reviewed, or proposed.

A typical entry

Here is an (abbreviated) example showing the different types of lines in an entry in the OEIS:

(history; published version; edit) No proposed changes to A000002.

NAME  

Kolakoski sequence: a(n) is length of n-th run; a(1) = 1; sequence consists just of 1's and 2's.

DATA  

1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 2

OFFSET  

1,2

COMMENTS  

It is an unsolved problem to show that the density of 1's is equal to 1/2.

The sequence is cubefree and all square subwords have lengths which are one of 2, 4, 6, 18 and 54.

This is a fractal sequence: replace each run with its length and recover the original sequence. - Kerry Mitchell, Dec 08 2005

...

REFERENCES  

J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, p. 337.

E. Angelini, "Jeux de suites", in Dossier Pour La Science, pp. 32-35, Volume 59 (Jeux math'), April/June 2008, Paris.

F. M. Dekking, On the structure of self-generating sequences, Seminar on Number Theory, 1980-1981 (Talence, 1980-1981), Exp. No. 31, 6 pp., Univ. Bordeaux I, Talence, 1981. Math. Rev. 83e:10075.

...

LINKS
  
N. J. A. Sloane, <a href="/A000002/b000002.txt">Table of n, a(n) for n = 1..10502</a>

J.-P. Allouche, M. Baake, J. Cassaigns and D. Damanik, <a href="http://www.lri.fr/~allouche/">Palindrome complexity</a>

Michael Baake and Bernd Sing, <a href="http://arXiv.org/abs/math.MG/0206098">Kolakoski-(3,1) is a (deformed) model set</a> 

...
 
FORMULA  

These two formulae define completely the sequence: a(1)=1, a(2)=2, a(a(1)+a(2)+...+a(k))=(3+(-1)^k)/2 and a(a(1)+a(2)+...+a(k)+1)=(3-(-1)^k)/2. - Benoit Cloitre, Oct 06 2003

a(n+2)*a(n+1)*a(n)/2 = a(n+2)+a(n+1)+a(n)-3 (this formula doesn't define the sequence, it is just a consequence of definition). - Benoit Cloitre, Nov 17 2003

a(n+1)=3-a(n)+(a(n)-a(n-1))*(a(b(n))-1), where b(n) is the sequence A156253. - Jean-Marc Fedou and Gabriele Fici, Mar 18 2010

EXAMPLE  

Start with a(1) = 1, a(2) = 2. The rule says that the first run (which is a single 1) has length 1, which it does and the second run (which starts with the 2) has length 2, so the third term must be a 2 also and the fourth term can't be a 2, so must be a 1. So we have a(3) = 2, a(4) = 1. Since a(3) = 2, the third run has length 2, so we deduce a(5) = 1, a(6) = 2. And so on. The correction I made was to change a(4) to a(5) and a(5) to a(6). - Labos Elemer, corrected by Graeme McRae

MAPLE  

M := 100; s := [ 1, 2, 2 ]; for n from 3 to M do for i from 1 to s[n] do s := [ op(s), 1+((n-1)mod 2) ]; od: od: s; A000002 := n->s[n];

MATHEMATICA  

a[steps_] := Module[{a = {1, 2, 2}}, Do[a = Append[a, 1 + Mod[(n - 1), 2]], {n, 3, steps}, {i, a[[n]]}]; a]

PROG  

(PARI) a=[ 1, 2, 2 ]; for(n=3, 80, for(i=1, a[n], a=concat(a, 1+((n-1)%2)))); a

(PARI) a(n)=local(an, m); if(n<1, 0, an=[1, 2, 2]; m=3; while(length(an)<n, an=concat(an, vector(an[m], i, (m-1)%2+1)); m++); an[n])

CROSSREFS  

Cf. A064353, A001462, A001083, A006928, A042942, A069864, A010060, A078880.

Cf. A079729, A079730, A078929, A171899.

KEYWORD  

nonn,core,easy,nice,new

AUTHOR  

N. J. A. Sloane

EXTENSIONS  

arXiv URL replaced with a non-cached version by R. J. Mathar, Oct 07 2009

STATUS  

approved

How many terms do we need?

Signing your name when you contribute to an existing sequence

Examples
T(k,n) = n(k-2)((k-2)n^2+1+2n)/2. - _R. J. Mathar_, Jun 12 2008
Comment from _Paul D. Hanna_, Jun 14 2009: (Start)
More generally, if G(x) = exp(p*x*exp(q*x*G(x))),
where G(x)^m = Sum_{n>=0} g(n,m)*x^n/n!,
then g(n,m) = Sum_{k=0..n} C(n,k)*p^k*q^(n-k)*m*(n-k+m)^(k-1)*k^(n-k).
(End)
T(k,n) = n(k-2)((k-2)n^2+1+2n)/2. [_R. J. Mathar_, Jun 12 2008]

Email

Don't include your email address

Sending email to an author or editor

Spelling and notation

The following are the correct spellings for some words and symbols that are commonly mistyped in the OEIS, also the preferred versions of various useful symbols:

Non-ASCII characters

Don't use non-ASCII characters! They just cause trouble, and the system may ignore a line containing a non-ASCII character without warning you. For example, do not use Greek letters (π, Σ), unusual symbols like not-equal-to (≠), less-than-or-equal-to (≤), greater-than-or-equal-to (≥), the 3-dot ellipsis character (…), etc.

Exceptions: titles of published works and names of authors, OEIS contributors, places, institutions, etc. whose proper spelling requires non-ASCII characters; for example:

Grammar

The possessive of a singular noun is formed by adding an apostrophe and an S, even if the noun ends in S. Write "Lucas's theorem", not "Lucas' theorem" (or perhaps "the Lucas theorem"). This rule is not universally accepted, so when directly quoting material for which the original editor did not abide by it, the quotation should not be altered.

Common mistakes in English

Technical definitions

Sequences with conjectured terms

In principle, the terms shown in an OEIS entry should have been proved to be correct and complete as far as they are shown. For example, in the list of Mersenne primes, A000043, we don't include terms which are known to be in the sequence if it is possible that there are earlier terms which have not yet been found (although such terms are mentioned in the Comments or Extensions sections).

What do we do when there are terms in a sequence which are only conjectural?

If you have solved a famous open problem

such as Goldbach's conjecture, the 3x+1 conjecture, etc., the OEIS is not the place to publish it. First publish your proof in a (reputable) mathematics journal.

See also

OEIS sequence entry fields
Name · Data · Offset · Comments · References · Links · Formula · Example · Maple · Mathematica · Prog · Crossrefs · Keyword · Author · Extensions
Retrieved from "https://oeis.org/w/index.php?title=Style_Sheet&oldid=1660036"

Categories: 
Style sheets
OEIS Contribution
 




Navigation menu


Views




Page

Discussion

View source

History
 



Personal tools




Log in

Request account
 




Navigation




OEIS

Wiki Main Page

Community portal

System Status

Recent changes

Random page

Help
 







Tools




What links here

Related changes

Special pages

Printable version

Permanent link

Page information
 






Powered by MediaWiki

This page was last edited on 21 June 2024, at 08:00.

Content is available under The OEIS End-User License Agreement unless otherwise noted.

License Agreements, Terms of Use, Privacy Policy

About OeisWiki

Disclaimers