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.

A229001 Total sum A(n,k) of the k-th powers of lengths of ascending runs in all permutations of [n]; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

0, 0, 1, 0, 1, 3, 0, 1, 4, 12, 0, 1, 6, 18, 60, 0, 1, 10, 32, 96, 360, 0, 1, 18, 66, 186, 600, 2520, 0, 1, 34, 152, 426, 1222, 4320, 20160, 0, 1, 66, 378, 1110, 2964, 9086, 35280, 181440, 0, 1, 130, 992, 3186, 8254, 22818, 75882, 322560, 1814400
Offset: 0

Views

Author

Alois P. Heinz, Sep 10 2013

Keywords

Examples

			A(3,2) = 32 = 9+5+5+5+5+3 = 3^2+4*(2^2+1^2)+3*1^2: (1,2,3), (1,3,2), (2,1,3), (2,3,1), (3,1,2), (3,2,1).
Square array A(n,k) begins:
:    0,    0,    0,     0,     0,      0,      0, ...
:    1,    1,    1,     1,     1,      1,      1, ...
:    3,    4,    6,    10,    18,     34,     66, ...
:   12,   18,   32,    66,   152,    378,    992, ...
:   60,   96,  186,   426,  1110,   3186,   9846, ...
:  360,  600, 1222,  2964,  8254,  25620,  86782, ...
: 2520, 4320, 9086, 22818, 66050, 214410, 765506, ...
		

Crossrefs

Columns k=0-10 give: A001710(n+1) for n>0, A001563, A228959, A229003, A228994, A228995, A228996, A228997, A228998, A228999, A229000.
Rows n=0-2 give: A000004, A000012, A052548.
Main diagonal gives: A229002.

Programs

  • Maple
    A:= (n, k)-> add(`if`(n=t, 1, n!/(t+1)!*(t*(n-t+1)+1
                 -((t+1)*(n-t)+1)/(t+2)))*t^k, t=1..n):
    seq(seq(A(n, d-n), n=0..d), d=0..12);
  • Mathematica
    A[n_, k_] := Sum[If[n == t, 1, n!/(t + 1)!*(t*(n - t + 1) + 1 - ((t + 1)*(n - t) + 1)/(t + 2))]* t^k, {t, 1, n}]; Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 12}] // Flatten (* Jean-François Alcover, Dec 27 2013, translated from Maple *)

Formula

A(n,k) = Sum_{t=1..n} t^k * A122843(n,t).
For fixed k, A(n,k) ~ n! * n * sum(t>=1, t^k*(t^2+t-1)/(t+2)!) = n! * n * ((Bell(k) - Bell(k+1) + sum(j=0..k, (-1)^j*(2^j*((2*k-j+1)/(j+1))-1) *Bell(k-j)*C(k,j)))*exp(1) - (-1)^k*(2^k-1)), where Bell(k) are Bell numbers A000110. - Vaclav Kotesovec, Sep 12 2013