login
Triangle read by rows, T(n, k) = [x^k] ((2*x^3 - 3*x^2 - x + 1)/(1 - x)^(n + 2)), for n >= 1 and 0 <= k < n.
2

%I #11 Mar 27 2022 10:54:14

%S 1,1,3,1,4,7,1,5,12,19,1,6,18,37,56,1,7,25,62,118,174,1,8,33,95,213,

%T 387,561,1,9,42,137,350,737,1298,1859,1,10,52,189,539,1276,2574,4433,

%U 6292,1,11,63,252,791,2067,4641,9074,15366,21658

%N Triangle read by rows, T(n, k) = [x^k] ((2*x^3 - 3*x^2 - x + 1)/(1 - x)^(n + 2)), for n >= 1 and 0 <= k < n.

%e Triangle starts:

%e [1] [1]

%e [2] [1, 3]

%e [3] [1, 4, 7]

%e [4] [1, 5, 12, 19]

%e [5] [1, 6, 18, 37, 56]

%e [6] [1, 7, 25, 62, 118, 174]

%e [7] [1, 8, 33, 95, 213, 387, 561]

%e [8] [1, 9, 42, 137, 350, 737, 1298, 1859]

%e [9] [1, 10, 52, 189, 539, 1276, 2574, 4433, 6292]

%p # Compare the analogue algorithm for the Bell triangle in A046937.

%p A350584Triangle := proc(len) local A, P, T, n; A := [2]; P := [1]; T := [[1]];

%p for n from 1 to len-1 do P := ListTools:-PartialSums([op(P), A[-1]]);

%p A := P; T := [op(T), P] od; T end:

%p A350584Triangle(10): ListTools:-Flatten(%);

%p # Alternative:

%p ogf := n -> (2*x^3 - 3*x^2 - x + 1)/(1 - x)^(n + 2):

%p ser := n -> series(ogf(n), x, n):

%p row := n -> seq(coeff(ser(n), x, k), k = 0..n-1):

%p seq(row(n), n = 1..10);

%Y A280891 (row sums), A135339 (alternating row sums), A005807 or A071716 (main diagonal).

%K nonn,tabl

%O 1,3

%A _Peter Luschny_, Mar 27 2022