A129530
a(n) = (1/2)*n*(n-1)*3^(n-1).
Original entry on oeis.org
0, 0, 3, 27, 162, 810, 3645, 15309, 61236, 236196, 885735, 3247695, 11691702, 41452398, 145083393, 502211745, 1721868840, 5854354056, 19758444939, 66248903619, 220829678730, 732224724210, 2416341589893, 7939408081077
Offset: 0
-
seq(n*(n-1)*3^(n-1)/2,n=0..27);
-
Table[(n(n-1)3^(n-1))/2,{n,0,30}] (* or *) LinearRecurrence[{9,-27,27},{0,0,3},30] (* Harvey P. Dale, Dec 18 2013 *)
-
a(n)=n*(n-1)*3^(n-1)/2 \\ Charles R Greathouse IV, Oct 16 2015
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
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}.
-
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
-
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
A381930
Irregular triangular array read by rows. T(n,k) is the number of length n words x on {0,1,2} such that I(x) + W_0(x)*W_1(x) + W_0(x)*W_2(x) + W_1(x)*W_2(x) = k where I(x) is the number of inversions in x and W_i(x) is the number of occurrences of the letter i in x for i={0,1,2}, n>=0, 0<=k<=floor(2n^2/3).
Original entry on oeis.org
1, 3, 3, 3, 3, 3, 0, 6, 7, 8, 2, 1, 3, 0, 0, 6, 9, 12, 18, 12, 12, 6, 3, 3, 0, 0, 0, 6, 6, 12, 15, 27, 27, 36, 33, 33, 21, 15, 6, 3, 3, 0, 0, 0, 0, 6, 6, 6, 12, 18, 27, 33, 52, 62, 77, 82, 86, 75, 68, 48, 35, 19, 11, 2, 1
Offset: 0
Triangle T(n,k) begins:
1;
3;
3, 3, 3;
3, 0, 6, 7, 8, 2, 1;
3, 0, 0, 6, 9, 12, 18, 12, 12, 6, 3;
3, 0, 0, 0, 6, 6, 12, 15, 27, 27, 36, 33, 33, 21, 15, 6, 3;
...
T(3,3) = 7 because we have: {0, 1, 0}, {0, 1, 2}, {0, 2, 0}, {1, 0, 1}, {1, 2, 1}, {2, 0, 2}, {2, 1, 2}.
-
b:= proc(n, i, j, k) option remember; expand(
`if`(n=0, z^(i*j+i*k+j*k), b(n-1, i+1, j, k)*z^(j+k)+
b(n-1, i, j+1, k)*z^k +b(n-1, i, j, k+1)))
end:
T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(n, 0$3)):
seq(T(n), n=0..10); # Alois P. Heinz, Mar 10 2025
-
nn = 6; B[n_] := FunctionExpand[QFactorial[n, q]]*q^Binomial[n, 2];e[z_] := Sum[z^n/B[n], {n, 0, nn}];Map[CoefficientList[#, q] &,Table[B[n], {n, 0, nn}] CoefficientList[Series[e[z]^3, {z, 0, nn}],z]] // Grid
Showing 1-3 of 3 results.
Comments