cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A345445 a(n) = n^n - (n+1)!/2.

Original entry on oeis.org

0, 1, 15, 196, 2765, 44136, 803383, 16595776, 385606089, 9980041600, 285072169811, 8912986937856, 302831517446653, 11111352988374016, 437883428985915375, 18446566229995503616, 827237060699483900177, 39346347252746333159424, 1978418439209309500803979, 104857574454528914145280000
Offset: 1

Views

Author

Olivier Gérard, Jun 19 2021

Keywords

Comments

This sequence appears as a class of nonsortable words of length n for several unadapted sorting algorithms. For instance this one:
- scan all values not at their index position
- rotate left 1 step all of them as a cycle
- repeat.
This is linked to the fact that one can encode the alternating permutations of length n+1 as words of length n.

Crossrefs

Cf. A185391 (Complement to n^n of a class of words).

Programs

  • Mathematica
    Table[n^n - (n + 1)!/2, {n, 1, 20}]