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.

A367495 Number of up-down permutations p of [n] such that for all ii+1 differs from the number of elements p(k) between p(i+1) and p(i+2) for k>i+2.

Original entry on oeis.org

1, 1, 1, 1, 2, 4, 11, 37, 147, 684, 3611, 21345, 139794, 1004293, 7853728, 66413562, 603851552, 5874507617, 60886603188, 669797203196, 7794401498440, 95662364870740, 1234953443995817, 16728449735374081, 237245379727483160, 3515622139828164851
Offset: 0

Views

Author

Alois P. Heinz, Nov 20 2023

Keywords

Examples

			a(0) = 1: (), the empty permutation.
a(1) = 1: 1.
a(2) = 1: 12.
a(3) = 1: 132.
a(4) = 2: 1423, 3412.
a(5) = 4: 13254, 15243, 35142, 45132.
a(6) = 11: 132645, 142635, 162534, 164523, 264513, 341625, 361524, 364512, 461523, 561423, 563412.
		

Crossrefs

Programs

  • Maple
    b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
          add(`if`(j=t, 0, b(o-1+j, u-j, j)), j=1..u))
        end:
    a:= n-> b(n, 0$2):
    seq(a(n), n=0..30);