A239605 First column of A316273. Recurrence similar to series reversion giving Catalan numbers.
1, 1, 2, 4, 10, 24, 66, 178, 508, 1464, 4320, 12886, 38992, 119030, 366740, 1138036, 3554962, 11167292, 35259290, 111825840, 356100044, 1138107490, 3649507278, 11738028470, 37857909164, 122411024822
Offset: 1
Keywords
Programs
-
Mathematica
Clear[t, n, k, i, nn, x]; coeff = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; mp[m_, e_] := If[e == 0, IdentityMatrix@Length@m, MatrixPower[m, e]]; nn = Length[coeff]; cc = Range[nn]*0 + 1; Monitor[ Do[Clear[t]; t[n_, 1] := t[n, 1] = cc[[n]]; t[n_, k_] := t[n, k] = If[n >= k, Sum[t[n - i, k - 1], {i, 1, k - 1}] - Sum[t[n - i, k], {i, 1, k - 1}], 0]; A4 = Table[Table[t[n, k], {k, 1, nn}], {n, 1, nn}]; A5 = A4[[1 ;; nn - 1]]; A5 = Prepend[A5, ConstantArray[0, nn]]; cc = Total[ Table[coeff[[n]]*mp[A5, n - 1][[All, 1]], {n, 1, nn}]];, {i, 1, nn}], i]; cc (* Mats Granvik, Aug 26 2015 *)
Comments