5

HoldForm @@ {Factor[x^105 - 1]} /. k_ x_^n_ :> RuleCondition[With[{b = Style[Abs[k], Red]}, If[Internal`SyntacticNegativeQ[k], -1, 1] HoldForm[b x^n]], Abs[k] > 1] Use Highlighted[Abs[k]] instead of Style[Abs[k], Red] to get See also: Replacement inside held expression Update: Displaying in TraditionalForm: HoldForm @@ (TraditionalForm /@ {...


3

In v12.1.1.0 the following works for the extra dimension (use Resolve instead of Reduce): Resolve[ForAll[{x}, a1 + x*b1 + x^2*c1 + d1 x^3 + a2 + x*b2 + x^2*c2 + d2 x^3 == a3 + x*b3 + x^2*c3 + x^3*d3], Reals] (* result: c3 == c1 + c2 && d3 == d1 + d2 && b3 == b1 + b2 && a3 == a1 + a2 *) You could use SolveAlways: for example ...


1

First a correction. The coefficient of z^n in the generating function should be p[n,c] and not p[n-4,c]. With this in mind, we may define (for simplicity I only sum up to 6. This is good enough here to make the point. In a real application you would sum up to Infinity and search for a closed form): p[-3, c] = p[-2, c] = p[-1, c] = 0; p[-4, c] = 1; p[n_, c_] :...


1

Here is one possibility (although a bit a tricky one): We first define a function that returns the Newton polynomial as a function : getNewton[xs_, ys_] := Module[{dd, i, newtoncoef}, dd[{i_Integer}] := ys[[i]] ;(*dd implements Newton recursion*) dd[i : {__} ] := (dd[ Rest@i] - dd[Most@i])/(xs[[Last@i]] - xs[[First@i]]); newtoncoef = dd[...


Only top voted, non community-wiki answers of a minimum length are eligible