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.

Showing 1-4 of 4 results.

A291684 Number T(n,k) of permutations p of [n] such that 0p has a nonincreasing jump sequence beginning with k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 2, 2, 0, 1, 5, 5, 5, 0, 1, 9, 12, 14, 16, 0, 1, 17, 36, 36, 47, 52, 0, 1, 31, 81, 98, 117, 166, 189, 0, 1, 57, 174, 327, 327, 425, 627, 683, 0, 1, 101, 413, 788, 988, 1116, 1633, 2400, 2621, 0, 1, 185, 889, 1890, 3392, 3392, 4291, 6471, 9459, 10061
Offset: 0

Views

Author

Alois P. Heinz, Aug 29 2017

Keywords

Comments

An up-jump j occurs at position i in p if p_{i} > p_{i-1} and j is the index of p_i in the increasingly sorted list of those elements in {p_{i}, ..., p_{n}} that are larger than p_{i-1}. A down-jump j occurs at position i in p if p_{i} < p_{i-1} and j is the index of p_i in the decreasingly sorted list of those elements in {p_{i}, ..., p_{n}} that are smaller than p_{i-1}. First index in the lists is 1 here.

Examples

			T(3,1) = 1: 123.
T(3,2) = 2: 213, 231.
T(3,3) = 2: 312, 321.
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 1,   1;
  0, 1,   2,   2;
  0, 1,   5,   5,   5;
  0, 1,   9,  12,  14,  16;
  0, 1,  17,  36,  36,  47,   52;
  0, 1,  31,  81,  98, 117,  166,  189;
  0, 1,  57, 174, 327, 327,  425,  627,  683;
  0, 1, 101, 413, 788, 988, 1116, 1633, 2400, 2621;
		

Crossrefs

Row sums and T(n+1,n+1) give A291685.
T(2n,n) gives A291688, T(2n+1,n+1) gives A303203, T(n,ceiling(n/2)) gives A303204.

Programs

  • Maple
    b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
          add(b(u-j, o+j-1, j), j=1..min(t, u))+
          add(b(u+j-1, o-j, j), j=1..min(t, o)))
        end:
    T:= (n, k)-> b(0, n, k)-`if`(k=0, 0, b(0, n, k-1)):
    seq(seq(T(n,k), k=0..n), n=0..12);
  • Mathematica
    b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, 1, Sum[b[u - j, o + j - 1, j], {j, 1, Min[t, u]}] + Sum[b[u + j - 1, o - j, j], {j, 1, Min[t, o]}]];
    T[n_, k_] :=  b[0, n, k] - If[k == 0, 0, b[0, n, k - 1]];
    Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jul 09 2018, after Alois P. Heinz *)

Formula

Sum_{k=0..n} T(n,k) = T(n+1,n+1) = A291685(n).
T(2n,n) = T(2n,n+1) for all n>0.

A288910 Number of permutations p of [n] such that 0p has a nonincreasing up-jump sequence and also has a nonincreasing down-jump sequence.

Original entry on oeis.org

1, 1, 2, 5, 18, 69, 303, 1357, 6552, 31961, 163587, 839710, 4485686, 23917300, 131366017, 722130351, 4059017880, 22809880116, 130713878478, 748596353814, 4354695496124, 25349532110660, 149415724294027, 881419904003486, 5256588077063477, 31377362011756061
Offset: 0

Views

Author

Alois P. Heinz, Sep 01 2017

Keywords

Comments

An up-jump j occurs at position i in p if p_{i} > p_{i-1} and j is the index of p_i in the increasingly sorted list of those elements in {p_{i}, ..., p_{n}} that are larger than p_{i-1}. A down-jump j occurs at position i in p if p_{i} < p_{i-1} and j is the index of p_i in the decreasingly sorted list of those elements in {p_{i}, ..., p_{n}} that are smaller than p_{i-1}. First index in the lists is 1 here.

Crossrefs

Programs

  • Maple
    b:= proc(u, o, t, s) option remember; `if`(u+o=0, 1,
          add(b(u-j, o+j-1, j, s), j=1..min(t, u))+
          add(b(u+j-1, o-j, t, j), j=1..min(s, o)))
        end:
    a:= n-> b(0, n$3):
    seq(a(n), n=0..26);
  • Mathematica
    b[u_, o_, t_, s_] := b[u, o, t, s] = If[u + o == 0, 1,
         Sum[b[u - j, o + j - 1, j, s], {j, Min[t, u]}] +
         Sum[b[u + j - 1, o - j, t, j], {j, Min[s, o]}]];
    a[n_] := b[0, n, n, n];
    Table[a[n], {n, 0, 26}] (* Jean-François Alcover, Aug 30 2021, after Alois P. Heinz *)

A288911 Number of permutations p of [n] such that 0p has a nonincreasing up-jump sequence.

Original entry on oeis.org

1, 1, 2, 5, 19, 80, 416, 2306, 14588, 98053, 724183, 5633793, 47416901, 417050215, 3914152702, 38288228393, 395496623939, 4241350801439, 47715403637219, 555476398869869, 6744406721447538, 84548532634924758, 1100301545470162305, 14751287346427752887
Offset: 0

Views

Author

Alois P. Heinz, Sep 01 2017

Keywords

Comments

An up-jump j occurs at position i in p if p_{i} > p_{i-1} and j is the index of p_i in the increasingly sorted list of those elements in {p_{i}, ..., p_{n}} that are larger than p_{i-1}. A down-jump j occurs at position i in p if p_{i} < p_{i-1} and j is the index of p_i in the decreasingly sorted list of those elements in {p_{i}, ..., p_{n}} that are smaller than p_{i-1}. First index in the lists is 1 here.

Crossrefs

Programs

  • Maple
    b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
          add(b(u-j, o+j-1, t), j=1..u)+
          add(b(u+j-1, o-j, j), j=1..min(t, o)))
        end:
    a:= n-> b(0, n$2):
    seq(a(n), n=0..30);
  • Mathematica
    b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, 1,
         Sum[b[u - j, o + j - 1, t], {j, u}] +
         Sum[b[u + j - 1, o - j, j], {j, Min[t, o]}]];
    a[n_] := b[0, n, n];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Aug 30 2021, after Alois P. Heinz *)

A288912 Number of permutations p of [n] such that 0p has a nonincreasing down-jump sequence.

Original entry on oeis.org

1, 1, 2, 6, 23, 106, 558, 3284, 21200, 148539, 1119273, 9013112, 77106652, 697811164, 6652604804, 66593158893, 697756930786, 7633155361594, 86969814549075, 1029939820075074, 12652809025029242, 160977119684852369, 2117642963178349336, 28763717105362639324
Offset: 0

Views

Author

Alois P. Heinz, Sep 01 2017

Keywords

Comments

An up-jump j occurs at position i in p if p_{i} > p_{i-1} and j is the index of p_i in the increasingly sorted list of those elements in {p_{i}, ..., p_{n}} that are larger than p_{i-1}. A down-jump j occurs at position i in p if p_{i} < p_{i-1} and j is the index of p_i in the decreasingly sorted list of those elements in {p_{i}, ..., p_{n}} that are smaller than p_{i-1}. First index in the lists is 1 here.

Crossrefs

Programs

  • Maple
    b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
          add(b(u-j, o+j-1, j), j=1..min(t, u))+
          add(b(u+j-1, o-j, t), j=1..o))
        end:
    a:= n-> b(0, n$2):
    seq(a(n), n=0..30);
  • Mathematica
    b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, 1,
         Sum[b[u - j, o + j - 1, j], {j, Min[t, u]}] +
         Sum[b[u + j - 1, o - j, t], {j, o}]];
    a[n_] := b[0, n, n];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Aug 31 2021, after Alois P. Heinz *)
Showing 1-4 of 4 results.