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.

A262124 Number A(n,k) of permutations p of [n] such that the up-down signature of 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, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 2, 0, 1, 1, 1, 3, 5, 0, 1, 1, 1, 3, 8, 16, 0, 1, 1, 1, 3, 9, 40, 61, 0, 1, 1, 1, 3, 9, 44, 162, 272, 0, 1, 1, 1, 3, 9, 45, 219, 1134, 1385, 0, 1, 1, 1, 3, 9, 45, 224, 1445, 6128, 7936, 0, 1, 1, 1, 3, 9, 45, 225, 1568, 9985, 55152, 50521, 0
Offset: 0

Views

Author

Alois P. Heinz, Sep 11 2015

Keywords

Examples

			p = 1423 is counted by T(4,1) because the up-down signature of p = 1423 is 1,-1,1 with partial sums 1,0,1.
q = 1432 is not counted by any T(4,k) because the up-down signature of q = 1432 is 1,-1,-1 with partial sums 1,0,-1.
A(4,1) = 5: 1324, 1423, 2314, 2413, 3412.
A(4,2) = 8: 1243, 1324, 1342, 1423, 2314, 2341, 2413, 3412.
A(4,3) = 9: 1234, 1243, 1324, 1342, 1423, 2314, 2341, 2413, 3412.
Square array A(n,k) begins:
  1,   1,    1,    1,    1,    1,    1,    1, ...
  1,   1,    1,    1,    1,    1,    1,    1, ...
  0,   1,    1,    1,    1,    1,    1,    1, ...
  0,   2,    3,    3,    3,    3,    3,    3, ...
  0,   5,    8,    9,    9,    9,    9,    9, ...
  0,  16,   40,   44,   45,   45,   45,   45, ...
  0,  61,  162,  219,  224,  225,  225,  225, ...
  0, 272, 1134, 1445, 1568, 1574, 1575, 1575, ...
		

Crossrefs

Main diagonal gives A000246.

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)-> `if`(n=0, 1, (p-> add(coeff(p, x, i), i=0..min(n, k))
                  )(add(b(j-1, n-j, 0), j=1..n))):
    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_] := If[n==0, 1, Function[p, Sum[Coefficient[p, x, i], {i, 0, Min[n, k]}]][ Sum[b[j-1, n-j, 0], {j, 1, n}]]]; 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} A262125(n,i).

A320980 Number of permutations p of [n] such that the up-down signature of p has nonnegative partial sums with a maximal value of six.

Original entry on oeis.org

0, 1, 7, 514, 4189, 154261, 1477381, 44169020, 493190771, 13821362271, 177705152975, 4949371839867, 72355179873697, 2058206624313873, 33818827542140211, 995975339452380880, 18206096557050382759, 558929622195992201388, 11264684856271486133087
Offset: 6

Views

Author

Alois P. Heinz, Oct 25 2018

Keywords

Crossrefs

Column k=6 of A262125.

Programs

  • Maple
    b:= proc(u, o, c) option remember; `if`(c<0 or c>6, 0, `if`(u+o=0,
           x^c, (p-> add(coeff(p, x, i)*x^max(i, c), i=0..6))(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-> coeff(add(b(j-1, n-j, 0), j=1..n), x, 6):
    seq(a(n), n=6..30);

Formula

a(n) = A262131(n) - A262130(n).

A320981 Number of permutations p of [n] such that the up-down signature of p has nonnegative partial sums with a maximal value of seven.

Original entry on oeis.org

0, 1, 8, 1031, 9379, 486299, 5084162, 196352061, 2352460536, 81070646577, 1103813259377, 36592927821767, 560827842703887, 18549898652794829, 317078625531545481, 10667284286197389079, 201655098112826170280, 6973904694490809821089, 144705018721890264334923
Offset: 7

Views

Author

Alois P. Heinz, Oct 25 2018

Keywords

Crossrefs

Column k=7 of A262125.

Programs

  • Maple
    b:= proc(u, o, c) option remember; `if`(c<0 or c>7, 0, `if`(u+o=0,
           x^c, (p-> add(coeff(p, x, i)*x^max(i, c), i=0..7))(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-> coeff(add(b(j-1, n-j, 0), j=1..n), x, 7):
    seq(a(n), n=7..30);

Formula

a(n) = A262132(n) - A262131(n).
Showing 1-3 of 3 results.