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.

A380993 Irregular triangular array read by rows. T(n,k) is the number of ternary words of length n containing at least one copy of each letter and having exactly k inversions, n>=3, 0<=k<=floor(n^2/3).

Original entry on oeis.org

1, 2, 2, 1, 3, 6, 9, 9, 6, 3, 6, 12, 21, 27, 30, 24, 18, 9, 3, 10, 20, 38, 55, 74, 81, 80, 69, 53, 34, 17, 8, 1, 15, 30, 60, 93, 138, 174, 210, 216, 219, 195, 165, 120, 84, 48, 27, 9, 3, 21, 42, 87, 141, 222, 303, 405, 480, 546, 579, 588, 552, 498, 414, 324, 240, 162, 99, 54, 27, 9, 3
Offset: 3

Views

Author

Geoffrey Critzer, Feb 11 2025

Keywords

Examples

			Triangle T(n,k) begins:
   1,  2,  2,  1;
   3,  6,  9,  9,  6,  3;
   6, 12, 21, 27, 30, 24, 18,  9,  3;
  10, 20, 38, 55, 74, 81, 80, 69, 53, 34, 17, 8, 1;
  ...
T(4,2) = 9 because we have: {0, 1, 2, 0}, {0, 2, 0, 1}, {0, 2, 1, 1}, {0, 2, 2, 1}, {1, 0, 0, 2}, {1, 0, 2, 1}, {1, 1, 0, 2}, {1, 2, 0, 2}, {2, 0, 1, 2}.
		

Crossrefs

Cf. A056454, A129529, A001117 (row sums).

Programs

  • Maple
    b:= proc(n, l) option remember; `if`(n=0, `if`(nops(subs(0=
          [][], l))=3, 1, 0), add(expand(x^([0, l[1], l[1]+l[2]][j])*
          b(n-1, subsop(j=`if`(j=3, 1, l[j]+1), l))), j=1..3))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, [0$3])):
    seq(T(n), n=3..10);  # Alois P. Heinz, Feb 12 2025
  • Mathematica
    nn = 8; B[n_] := FunctionExpand[QFactorial[n, u]];
    e[z_] := Sum[z^n/B[n], {n, 0, nn}];
    Drop[Map[CoefficientList[#, u] &,
       Map[Normal[Series[#, {u, 0, Binomial[nn, 2]}]] &,
        Table[B[n], {n, 0, nn}] CoefficientList[
          Series[(e[z] - 1)^3, {z, 0, nn}], z]]], 3] // Grid

Formula

Sum_{n>=0} Sum_{k>=0} T(n,k)*q^k*x^n/B(n) = (e(x)-1)^3 where B(n) = Product_{i=1..n} (q^i-1)/(q-1) and e(x) = Sum_{n>=0} x^n/B(n).
Sum_{k=0..floor(n^2/3)} (-1)^k * T(n,k) = A056454(n). - Alois P. Heinz, Feb 12 2025