login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Triangle T(n, k, m) = round( t(n,m)/(t(k,m)*t(n-k,m)) ), with T(0, k, m) = 1, where t(n, k) = Product_{j=1..n} A129862(k+1, j), t(n, 0) = n!, and m = 3, read by rows.
5

%I #13 Sep 08 2022 08:45:41

%S 1,1,1,1,-2,1,1,4,4,1,1,-4,8,-4,1,1,4,8,8,4,1,1,-4,8,-8,8,-4,1,1,4,8,

%T 8,8,8,4,1,1,-4,8,-8,8,-8,8,-4,1,1,4,8,8,8,8,8,8,4,1,1,-4,8,-8,8,-8,8,

%U -8,8,-4,1

%N Triangle T(n, k, m) = round( t(n,m)/(t(k,m)*t(n-k,m)) ), with T(0, k, m) = 1, where t(n, k) = Product_{j=1..n} A129862(k+1, j), t(n, 0) = n!, and m = 3, read by rows.

%C Cartan_Dn refers to a Cartan matrix of type D_n. - _N. J. A. Sloane_, Jun 25 2021

%H G. C. Greubel, <a href="/A156609/b156609.txt">Rows n = 0..100 of the triangle, flattened</a>

%F T(n, k, m) = round( t(n,m)/(t(k,m)*t(n-k,m)) ), with T(0, k, m) = 1, where t(n, k) = Product_{j=1..n} A129862(k+1, j), t(n, 0) = n!, and m = 3.

%F T(n, k) defined by T(n, 0) = T(n, n) = 1, T(2, 1) = -2, T(n, 1) = T(n, n-1) = 4*(-1)^(n+1), T(n, 2) = T(n, n-2) = 8, T(n, k) = 8*(-1)^k if n mod 2 = 0, and T(n, k) = 8 otherwise. - _G. C. Greubel_, Jun 24 2021

%e Triangle begins:

%e 1;

%e 1, 1;

%e 1, -2, 1;

%e 1, 4, 4, 1;

%e 1, -4, 8, -4, 1;

%e 1, 4, 8, 8, 4, 1;

%e 1, -4, 8, -8, 8, -4, 1;

%e 1, 4, 8, 8, 8, 8, 4, 1;

%e 1, -4, 8, -8, 8, -8, 8, -4, 1;

%e 1, 4, 8, 8, 8, 8, 8, 8, 4, 1;

%e 1, -4, 8, -8, 8, -8, 8, -8, 8, -4, 1;

%t (* First program *)

%t b[n_, k_, d_]:= If[n==k, 2, If[(k==d && n==d-2) || (n==d && k==d-2), -1, If[(k==n- 1 || k==n+1) && n<=d-1 && k<=d-1, -1, 0]]];

%t M[d_]:= Table[b[n, k, d], {n, d}, {k, d}];

%t p[x_, n_]:= If[n==0, 1, CharacteristicPolynomial[M[n], x]];

%t f = Table[p[x, n], {n, 0, 20}];

%t t[n_, k_]:= If[k==0, n!, Product[f[[j+1]], {j, n-1}]]/.x -> k+1;

%t T[n_, k_, m_]:= Round[t[n, m]/(t[k, m]*t[n-k, m])];

%t Table[T[n, k, 3], {n,0,15}, {k, 0, n}]//Flatten (* modified by _G. C. Greubel_, Jun 23 2021 *)

%t (* Second program *)

%t f[n_, x_]:= f[n,x]= If[n<2, (2-x)^n, (2-x)*LucasL[2*(n-1), Sqrt[-x]] ];

%t t[n_, k_]:= t[n,k]= If[k==0, n!, Product[f[j, x], {j, n-1}]]/.x -> (k+1);

%t T[n_, k_, m_]:= T[n,k,m]= Round[t[n,m]/(t[k,m]*t[n-k,m])];

%t Table[T[n, k, 3], {n,0,15}, {k,0,n}]//Flatten (* _G. C. Greubel_, Jun 23 2021 *)

%o (Magma)

%o function T(n,k)

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

%o elif n eq 2 and k eq 1 then return -2;

%o elif k eq 1 or k eq n-1 then return 4*(-1)^(n+1);

%o elif k eq 2 or k eq n-2 then return 8;

%o elif (n mod 2) eq 0 then return 8*(-1)^k;

%o else return 8;

%o end if; return T;

%o end function;

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

%o (Sage)

%o @CachedFunction

%o def f(n,x): return (2-x)^n if (n<2) else 2*(2-x)*sum( ((n-1)/(2*n-j-2))*binomial(2*n-j-2, j)*(-x)^(n-j-1) for j in (0..n-1) )

%o def g(n,k): return factorial(n) if (k==0) else product( f(j, k+1) for j in (1..n-1) )

%o def T(n,k,m): return round( g(n,m)/(g(k,m)*g(n-k,m)) )

%o flatten([[T(n,k,3) for k in (0..n)] for n in (0..15)]) # _G. C. Greubel_, Jun 23 2021

%Y Cf. A129862, A007318 (m=0), A156608 (m=2), this sequence (m=3), A156610 (m=4), A156612.

%K sign,tabl

%O 0,5

%A _Roger L. Bagula_, Feb 11 2009

%E Definition corrected and edited by _G. C. Greubel_, Jun 23 2021