login
Triangle, T(n, k) = A008517(n+1, k+1)*A008517(n+1, n-k+1), read by rows.
1

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

%S 1,2,2,6,64,6,24,1276,1276,24,120,23088,107584,23088,120,720,422712,

%T 6388800,6388800,422712,720,5040,8156160,326165400,1031694400,

%U 326165400,8156160,5040,40320,168521184,15666814800,126099116000,126099116000,15666814800,168521184,40320

%N Triangle, T(n, k) = A008517(n+1, k+1)*A008517(n+1, n-k+1), read by rows.

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

%F T(n, k) = A008517(n+1, k+1)*A008517(n+1, n-k+1).

%F From _G. C. Greubel_, Dec 30 2021: (Start)

%F T(n, n-k) = T(n, k).

%F T(n, 0) = n!. (End)

%e Triangle begins as:

%e 1;

%e 2, 2;

%e 6, 64, 6;

%e 24, 1276, 1276, 24;

%e 120, 23088, 107584, 23088, 120;

%e 720, 422712, 6388800, 6388800, 422712, 720;

%e 5040, 8156160, 326165400, 1031694400, 326165400, 8156160, 5040;

%t f[n_, k_]:= f[n, k]= If[k<0 || k>n, 0, If[k==0, 1, (k+1)*f[n-1, k] + (2*n-k+1)*f[n-1, k-1] ]]; (* f = A008517 *)

%t T[n_, k_]:= f[n+1, k+1]*f[n+1, n-k+1];

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

%o (Magma)

%o A008517:= func< n,k | (&+[ (-1)^(n+j)*Binomial(2*n+1, j)*StiringFirst(2*n-k-j+1, n-k-j+1) : j in [0..n-k]]) >;

%o A156529:= func< n,k | A008517(n+1,k+1)*A008517(n+1,n-k+1) >;

%o [A156529(n,k): k in [0..n], n in [0..12]]; // _G. C. Greubel_, Dec 30 2021

%o (Sage)

%o @CachedFunction

%o def A008517(n,k): return sum( (-1)^(n+j)*binomial(2*n+1, j)*stirling_number1(2*n-k-j+1, n-k-j+1) for j in (0..n-k) )

%o def A156529(n,k): return A008517(n+1, k+1)*A008517(n+1, n-k+1)

%o flatten([[A156529(n,k) for k in (0..n)] for n in (0..12)]) # _G. C. Greubel_, Dec 30 2021

%Y Cf. A008517.

%K nonn,tabl

%O 0,2

%A _Roger L. Bagula_, Feb 09 2009

%E Edited by _G. C. Greubel_, Dec 30 2021