fredrikj.net / blog /

# Fungrim ♥ OEIS

*September 25, 2019*

Among the most important families of mathematical functions are functions $f : \mathbb{Z} \rightarrow \mathbb{Z}$, better known as integer sequences. The main reference for integer sequences is the On-Line Encyclopedia of Integer Sequences (OEIS). The OEIS assigns every interesting integer sequence an official "name" in the form of an A-number. For example, A000045 is the sequence of Fibonacci numbers, $$F_n = \text{A000045}\!\left(n\right).$$

The goal of Fungrim is to build
a database of mathematical functions, including more diverse
objects than integer sequences.
Integer sequences are of course an important special case.
For example, the Fibonacci numbers exist as a defined entity in Fungrim,
denoted by the symbol `Fibonacci`
(with `Fibonacci(n)` giving the value of the nth Fibonacci number).
There is a topic page on
Fibonacci numbers
listing lots of formulas involving these numbers.

In honor of OEIS's founder Neil Sloane, I've added a function
to Fungrim denoted by `SloaneA(X, n)`,
which renders as
$\text{A00000X}(n)$ in LaTeX.
This symbol can now be used in Fungrim to refer to an arbitrary OEIS sequence.
Moreover, in any Fungrim entry where `SloaneA` is used,
Fungrim automatically generates a link
to the right entry on the OEIS website (under "References"). Neat!

The new Integer sequences
topic page in Fungrim explains the `SloaneA` symbol
and gives some examples of integer sequences (using both the Fungrim
notation and the OEIS name).
The typical formula is a
simple statement of equality: for example, Fungrim entry
373aa1
gives the relation $F_n = \text{A000045}\!\left(n\right)$
between the Fungrim symbol for Fibonacci numbers and the OEIS sequence.

But there's more: "Sloane's A-function" is just like any mathematical function in Fungrim, and can be used anywhere in formulas. For example, Fungrim entry 483547 invokes the OEIS sequence for the digits of $\pi$ $$\pi = \sum_{n=1}^{\infty} \text{A000796}\!\left(n\right) {10}^{1 - n}$$ and Fungrim entry b6111c invokes the OEIS sequences for the numerators and denominators of Bernoulli numbers, $$B_{n} = \frac{\text{A027641}\!\left(n\right)}{\text{A027642}\!\left(n\right)}.$$ The idea is not to use cryptic OEIS identifiers as a substitute for normal symbols in Fungrim: important integer sequences will get their own Fungrim symbols in due time. The purpose is rather to link the definitions so that Fungrim users can find the relevant OEIS entries to search for further information. Sloane's A-function may also be appropriate to use in Fungrim to refer to obscure integer sequences that only appear in a single formula, in which case a new Fungrim symbol to replace the A-notation would not add anything valuable.

There are many other ways that Fungrim could be integrated with existing mathematical databases and software. Just to mention one idea, it would make sense to link Ordner to OEIS as well. A couple of persons have asked for DLMF references. Then there is the issue of providing translations to existing computer algebra systems... It's all just a matter of writing the code and putting in the reference information... time, time, time (if I had more of it)!