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).

This page as a plain text file.
%I A380993 #20 Feb 14 2025 11:14:05
%S A380993 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,
%T A380993 53,34,17,8,1,15,30,60,93,138,174,210,216,219,195,165,120,84,48,27,9,
%U A380993 3,21,42,87,141,222,303,405,480,546,579,588,552,498,414,324,240,162,99,54,27,9,3
%N 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).
%H A380993 Alois P. Heinz, <a href="/A380993/b380993.txt">Rows n = 3..50, flattened</a>
%F A380993 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).
%F A380993 Sum_{k=0..floor(n^2/3)} (-1)^k * T(n,k) = A056454(n). - _Alois P. Heinz_, Feb 12 2025
%e A380993 Triangle T(n,k) begins:
%e A380993    1,  2,  2,  1;
%e A380993    3,  6,  9,  9,  6,  3;
%e A380993    6, 12, 21, 27, 30, 24, 18,  9,  3;
%e A380993   10, 20, 38, 55, 74, 81, 80, 69, 53, 34, 17, 8, 1;
%e A380993   ...
%e A380993 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}.
%p A380993 b:= proc(n, l) option remember; `if`(n=0, `if`(nops(subs(0=
%p A380993       [][], l))=3, 1, 0), add(expand(x^([0, l[1], l[1]+l[2]][j])*
%p A380993       b(n-1, subsop(j=`if`(j=3, 1, l[j]+1), l))), j=1..3))
%p A380993     end:
%p A380993 T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, [0$3])):
%p A380993 seq(T(n), n=3..10);  # _Alois P. Heinz_, Feb 12 2025
%t A380993 nn = 8; B[n_] := FunctionExpand[QFactorial[n, u]];
%t A380993 e[z_] := Sum[z^n/B[n], {n, 0, nn}];
%t A380993 Drop[Map[CoefficientList[#, u] &,
%t A380993    Map[Normal[Series[#, {u, 0, Binomial[nn, 2]}]] &,
%t A380993     Table[B[n], {n, 0, nn}] CoefficientList[
%t A380993       Series[(e[z] - 1)^3, {z, 0, nn}], z]]], 3] // Grid
%Y A380993 Cf. A056454, A129529, A001117 (row sums).
%K A380993 nonn,tabf
%O A380993 3,2
%A A380993 _Geoffrey Critzer_, Feb 11 2025