OFFSET
0,2
LINKS
G. C. Greubel, Rows n = 0..50 of the triangle, flattened
FORMULA
EXAMPLE
Triangle begins as:
1;
2, 2;
6, 64, 6;
24, 1276, 1276, 24;
120, 23088, 107584, 23088, 120;
720, 422712, 6388800, 6388800, 422712, 720;
5040, 8156160, 326165400, 1031694400, 326165400, 8156160, 5040;
MATHEMATICA
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[n_, k_]:= f[n+1, k+1]*f[n+1, n-k+1];
Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* modified by G. C. Greubel, Dec 30 2021 *)
PROG
(Magma)
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]]) >;
[A156529(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Dec 30 2021
(Sage)
@CachedFunction
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) )
flatten([[A156529(n, k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Dec 30 2021
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Roger L. Bagula, Feb 09 2009
EXTENSIONS
Edited by G. C. Greubel, Dec 30 2021
STATUS
approved