I have many expressions of this form:
expression = 1/96 (-26 I + 15 Sqrt[3]) c[1] - c[1]^3/(8 Sqrt[3]) +
1/120 I c[1]^5 + 5/96 (-5 I + 2 Sqrt[3]) c[3] +
1/480 (11 I + 135 Sqrt[3]) c[5]
For each c[a]^b term, I want to form a tuple with the coefficient to c[a]^b, argument of c[a]^b which is a, and power of c[a]^b which is b. I want a list of all these tuples.
So for this example, I want a function of expression
that returns
{{1/96 (-26 I + 15 Sqrt[3]), 1,1},{1/(8 Sqrt[3]),1,3},...}
How do I do this with Mathematica?
CoefficientRules[expression, Array[c, 5]]
. The format of the output is a bit different what you asked for. But maybe it suits your needs. $\endgroup$