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-3 of 3 results.

A262163 Number A(n,k) of permutations p of [n] such that the up-down signature of 0,p has nonnegative partial sums with a maximal value <= k; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 2, 2, 0, 1, 1, 2, 4, 5, 0, 1, 1, 2, 5, 16, 16, 0, 1, 1, 2, 5, 19, 54, 61, 0, 1, 1, 2, 5, 20, 82, 324, 272, 0, 1, 1, 2, 5, 20, 86, 454, 1532, 1385, 0, 1, 1, 2, 5, 20, 87, 516, 2795, 12256, 7936, 0, 1, 1, 2, 5, 20, 87, 521, 3135, 20346, 74512, 50521, 0
Offset: 0

Views

Author

Alois P. Heinz, Sep 13 2015

Keywords

Examples

			Square array A(n,k) begins:
  1,   1,    1,    1,    1,    1,    1,    1, ...
  0,   1,    1,    1,    1,    1,    1,    1, ...
  0,   1,    2,    2,    2,    2,    2,    2, ...
  0,   2,    4,    5,    5,    5,    5,    5, ...
  0,   5,   16,   19,   20,   20,   20,   20, ...
  0,  16,   54,   82,   86,   87,   87,   87, ...
  0,  61,  324,  454,  516,  521,  522,  522, ...
  0, 272, 1532, 2795, 3135, 3264, 3270, 3271, ...
		

Crossrefs

Main diagonal gives: A258830.

Programs

  • Maple
    b:= proc(u, o, c) option remember; `if`(c<0, 0, `if`(u+o=0, x^c,
          (p-> add(coeff(p, x, i)*x^max(i, c), i=0..degree(p)))(add(
           b(u-j, o-1+j, c-1), j=1..u)+add(b(u+j-1, o-j, c+1), j=1..o))))
        end:
    A:= (n, k)-> (p-> add(coeff(p, x, i), i=0..min(n, k)))(b(0, n, 0)):
    seq(seq(A(n, d-n), n=0..d), d=0..12);
  • Mathematica
    b[u_, o_, c_] := b[u, o, c] = If[c < 0, 0, If[u + o == 0, x^c, Function[p, Sum[Coefficient[p, x, i]*x^Max[i, c], {i, 0, Exponent[p, x]}]][Sum[b[u - j, o - 1 + j, c - 1], {j, 1, u}] + Sum[b[u + j - 1, o - j, c + 1], {j, 1, o}]]]]; A[n_, k_] := Function[p, Sum[Coefficient[p, x, i], {i, 0, Min[n, k]}]][b[0, n, 0]]; Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 12}] // Flatten (* Jean-François Alcover, Feb 22 2016, after Alois P. Heinz *)

Formula

A(n,k) = Sum_{i=0..k} A258829(n,i).

A316391 Number of permutations p of [n] such that the up-down signature of 0,p has nonnegative partial sums with a maximal value of four.

Original entry on oeis.org

1, 4, 62, 340, 4734, 33855, 495371, 4403025, 70083872, 746704117, 13023762276, 161905131484, 3091115525637, 43928623624790, 914530883776894, 14623431780216366, 330413968185491070, 5870376151413374683, 143271256595612492851, 2799645366893284489691
Offset: 4

Views

Author

Alois P. Heinz, Jul 01 2018

Keywords

Crossrefs

Column k=4 of A258829.

Programs

  • Maple
    b:= proc(u, o, c, k) option remember;
          `if`(c<0 or c>k, 0, `if`(u+o=0, 1,
           add(b(u-j, o-1+j, c+1, k), j=1..u)+
           add(b(u+j-1, o-j, c-1, k), j=1..o)))
        end:
    a:= n-> b(n, 0$2, 4)-b(n, 0$2, 3):
    seq(a(n), n=4..23);

Formula

a(n) = A262166(n) - A262165(n).

A316392 Number of permutations p of [n] such that the up-down signature of 0,p has nonnegative partial sums with a maximal value of five.

Original entry on oeis.org

1, 5, 129, 819, 16066, 127538, 2423226, 23367449, 459383574, 5246611332, 109138956326, 1446115120862, 32069014233249, 484780196858918, 11478459399841878, 195255855453716821, 4931560739013573590, 93326559046408832001, 2509294817575539112099
Offset: 5

Views

Author

Alois P. Heinz, Jul 01 2018

Keywords

Crossrefs

Column k=5 of A258829.

Programs

  • Maple
    b:= proc(u, o, c, k) option remember;
          `if`(c<0 or c>k, 0, `if`(u+o=0, 1,
           add(b(u-j, o-1+j, c+1, k), j=1..u)+
           add(b(u+j-1, o-j, c-1, k), j=1..o)))
        end:
    a:= n-> b(n, 0$2, 5)-b(n, 0$2, 4):
    seq(a(n), n=5..23);

Formula

a(n) = A262167(n) - A262166(n).
Showing 1-3 of 3 results.