Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Clear[t, n, k, i, nn, x]
- coeff = {1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
- 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]]*MatrixPower[A5, n - 1][[All, 1]], {n, 1, nn}]];
- , {i, 1, nn}], i]
- cc
- CoefficientList[Series[(1 + x)/(1 + 2*x), {x, 0, nn - 1}], x]
- Flatten[{1, Table[(-(-2)^(n - 1)), {n, 1, 28 - 1}]}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement