This site is supported by donations to The OEIS Foundation.

# Offsets

The offset in an OEIS sequence entry gives the index of the first term of the sequence (in other words, it tells us where the sequence starts). Given a sequence of a function $\scriptstyle f(n) \,$ with offset 3, this tells us that the first $\scriptstyle f(n) \,$ listed corresponds to $\scriptstyle n \,=\, 3 \,$. Below are some examples.

## Examples of offsets

### Offset 0

• Functions that are defined for all integers, and more pointedly, are a mapping from the integers to the integers. For example, $\scriptstyle n^2 \,$. Theoretically, we could start our listing at –3 or –7, but these are rather arbitrary choices, and the choice of $\scriptstyle -\infty \,$ doesn't give a well-ordered (i.e. no first term) sequence. Therefore, the logical offset is 0 (indeed that is the offset of A000290). In any case, for this example, since $\scriptstyle (-n)^2 \,=\, n^2 \,$, this presents no loss of information (otherwise, there may be two separate sequences, one for $\scriptstyle f(-n) \,$ and the other for $\scriptstyle f(n) \,$.
• Functions that are defined for all nonnegative integers. For example, $\scriptstyle \lfloor \sqrt{n} \rfloor \,$ (see A000196).[1]

### Offset 1

• Lists should should be 1-indexed (rather than 0-indexed). For example, in Leporello's famous "catalogue aria" from Don Giovanni, he sings five numbers, "seicento e quaranta," "duecento e trentuna," "cento," "novantuna," "mille e tre."[2] So, 640 is the first number he sings, and therefore, the offset of A027885 is 1.

### Offset 2

• A112823 Largest prime $\scriptstyle p \,\leq\, n \,$ in any decomposition of $\scriptstyle 2n \,$ into a sum of two primes. If a smaller value was chosen, not all values would be defined.

### Offset 3

• A002374 Largest prime $\scriptstyle p \,\leq\, n \,$ in any decomposition of $\scriptstyle 2n \,$ into a sum of two odd primes. If a smaller value was chosen, not all values would be defined.

## Notes

1. Of course for negative integers, we need only multiply the values of this sequence by the imaginary unit, assuming we understand the definition as being $\scriptstyle \lfloor \Im(\sqrt{n}) \rfloor \,$, and that $\scriptstyle \Im(z) \,$ returns a real value that the floor function can then handle ordinarily.
2. Aaron Greene, Leporello's "Catalog Aria" from Mozart's opera Don Giovanni: Lyrics and English Translation About.com