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.

A381369 A(n,k) is the sum over all partitions of [n] of k^j for a partition with j inversions; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 2, 4, 1, 1, 2, 5, 8, 1, 1, 2, 6, 15, 16, 1, 1, 2, 7, 28, 52, 32, 1, 1, 2, 8, 47, 204, 203, 64, 1, 1, 2, 9, 72, 628, 2344, 877, 128, 1, 1, 2, 10, 103, 1552, 17327, 43160, 4140, 256, 1, 1, 2, 11, 140, 3276, 84416, 1022983, 1291952, 21147, 512
Offset: 0

Views

Author

Alois P. Heinz, Feb 21 2025

Keywords

Examples

			Square array A(n,k) begins:
   1,   1,    1,     1,     1,      1,      1, ...
   1,   1,    1,     1,     1,      1,      1, ...
   2,   2,    2,     2,     2,      2,      2, ...
   4,   5,    6,     7,     8,      9,     10, ...
   8,  15,   28,    47,    72,    103,    140, ...
  16,  52,  204,   628,  1552,   3276,   6172, ...
  32, 203, 2344, 17327, 84416, 307867, 915848, ...
		

Crossrefs

Columns k=0-5 give: A011782, A000110, A125812, A125813, A125814, A125815.
Main diagonal gives A381373.

Programs

  • Maple
    b:= proc(o, u, t, k) option remember;
         `if`(u+o=0, 1, `if`(t>0, b(u+o, 0$2, k), 0)+add(k^(u+j-1)*
            b(o-j, u+j-1, min(2, t+1), k), j=`if`(t=0, 1, 1..o)))
        end:
    A:= (n, k)-> b(n, 0$2, k):
    seq(seq(A(n, d-n), n=0..d), d=0..10);
  • Mathematica
    Unprotect[Power]; 0^0 = 1; Protect[Power];
    b[o_, u_, t_, k_] := b[o, u, t, k] =
       If[u + o == 0, 1, If[t > 0, b[u + o, 0, 0, k], 0] + Sum[k^(u + j - 1)*
       b[o - j, u + j - 1, Min[2, t + 1], k], {j, If[t == 0, {1}, Range[o]]}]];
    A[n_, k_] := b[n, 0, 0, k];
    Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 10}] // Flatten (* Jean-François Alcover, Mar 15 2025, after Alois P. Heinz *)

Formula

A(n,k) = Sum_{j>=0} k^j * A125810(n,j).