OFFSET
1,3
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.
MATHEMATICA
Table[n^n - (n + 1)!/2, {n, 1, 20}]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Olivier Gérard, Jun 19 2021
STATUS
approved