Observe the following Wolfram Mathematica expression which results in a table of integer sequences:
b[n_, k_] := b[n, k] = If[n == 0, 1, If[n == 1, If[k > 0, 1, 0], Sum[Binomial[n-1, r-1]*b[r-1, k-1]*b[n-r, k-1], {r, 1, n}] ] ]; t [n_, k_] := b[n, k] - If[k > 0, b[n, k-1], 0]; Table[Table[t[n, k], {k, 0, n}], {n, 0, 10}]
I’m struggling to interpret what this is actually doing. Clearly it’s quite a complicated mess of if statements, but I’m not entirely sure if they are necessary or not. I obtained the expression from here:
Because I wanted to determine an expression (dependent on the two variables n and k) which would result in table of integers seen there. Would somebody please write the Mathematica code above in closed form so that it’s easier to understand? If this is not possible, can you at least try to explain what’s going on, and perhaps give an expression which models the above in most situations?
