|
MATHEMATICA
|
q = x^2; s = x + 1; z = 22;
p[0, x_] := 1; p[1, x_] := x;
p[n_, x_] := n*p[n - 1, x] + p[n - 2, x]*x^2;
Table[Expand[p[n, x]], {n, 0, 7}]
reduce[{p1_, q_, s_, x_}] :=
FixedPoint[(s PolynomialQuotient @@ #1 +
PolynomialRemainder @@ #1 &)[{#1, q, x}] &, p1]
t = Table[reduce[{p[n, x], q, s, x}], {n, 0, z}];
u1 = Table[Coefficient[Part[t, n], x, 0], {n, 1, z}]
u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}]
|