login
Triangle T(n, k) = T(n-1, k) + T(n-1, k-1) + ((n+1)*(n+2)*(2*n+3)*(3*n^2+9*n+5)/30)*T(n-2, k-1), read by rows.
6

%I #12 Mar 04 2021 07:04:40

%S 1,1,1,1,100,1,1,455,455,1,1,1435,98810,1435,1,1,3711,1135370,1135370,

%T 3711,1,1,8388,7849141,464306300,7849141,8388,1,1,17161,40410421,

%U 10431621081,10431621081,40410421,17161,1,1,32495,169040786,130822910455,7140071740062,130822910455,169040786,32495,1

%N Triangle T(n, k) = T(n-1, k) + T(n-1, k-1) + ((n+1)*(n+2)*(2*n+3)*(3*n^2+9*n+5)/30)*T(n-2, k-1), read by rows.

%C Row sums are: {1, 2, 102, 912, 101682, 2278164, 480021360, 20944097328, ...}.

%C The row sums of this class of sequences (see cross references) is given by the following. Let S(n) be the row sum then S(n) = 2*S(n-1) + f(n)*S(n-2) for a given f(n). For this sequence f(n) = (n+1)*(n+2)*(2*n+3)*(3*n^2+9*n+5)/30 = A000538(n+1). - _G. C. Greubel_, Mar 02 2021

%H G. C. Greubel, <a href="/A154230/b154230.txt">Rows n = 0..50 of the triangle, flattened</a>

%F T(n, k) = T(n-1, k) + T(n-1, k-1) + ((n+1)*(n+2)*(2*n+3)*(3*n^2+9*n+5)/30)*T(n-2, k-1) with T(n, 0) = T(n, n) = 1.

%e Triangle begins as:

%e 1;

%e 1, 1;

%e 1, 100, 1;

%e 1, 455, 455, 1;

%e 1, 1435, 98810, 1435, 1;

%e 1, 3711, 1135370, 1135370, 3711, 1;

%e 1, 8388, 7849141, 464306300, 7849141, 8388, 1;

%e 1, 17161, 40410421, 10431621081, 10431621081, 40410421, 17161, 1;

%p T:= proc(n, k) option remember;

%p if k=0 or k=n then 1

%p else T(n-1, k) +T(n-1, k-1) +((n+1)*(n+2)*(2*n+3)*(3*n^2+9*n+5)/30)*T(n-2, k-1)

%p fi; end:

%p seq(seq(T(n, k), k=0..n), n=0..12); # _G. C. Greubel_, Mar 02 2021

%t T[n_, k_]:= T[n,k]= If[k==0 || k==n, 1, T[n-1, k] + T[n-1, k-1] + ((n+1)*(n+2)*(2*n+3)*(3*n^2+9*n+5)/30)*T[n-2, k-1] ];

%t Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* modified by _G. C. Greubel_, Mar 02 2021 *)

%o (Sage)

%o def f(n): return (n+1)*(n+2)*(2*n+3)*(3*n^2+9*n+5)/30

%o def T(n,k):

%o if (k==0 or k==n): return 1

%o else: return T(n-1, k) + T(n-1, k-1) + f(n)*T(n-2, k-1)

%o flatten([[T(n,k) for k in (0..n)] for n in (0..12)]) # _G. C. Greubel_, Mar 02 2021

%o (Magma)

%o f:= func< n | (n+1)*(n+2)*(2*n+3)*(3*n^2+9*n+5)/30 >;

%o function T(n,k)

%o if k eq 0 or k eq n then return 1;

%o else return T(n-1, k) + T(n-1, k-1) + f(n)*T(n-2, k-1);

%o end if; return T;

%o end function;

%o [T(n,k): k in [0..n], n in [0..12]]; // _G. C. Greubel_, Mar 02 2021

%Y Cf. A154227, A154228, A154229, A154231, A154233.

%Y Cf. A000538.

%K nonn,tabl,easy

%O 0,5

%A _Roger L. Bagula_, Jan 05 2009

%E Edited by _G. C. Greubel_, Mar 02 2021