Paraffins: Difference between revisions

m
m (→‎{{header|REXX}}: added whitespace, used a smaller font for the output.)
Line 1,522:
{{works with|Mathematica|9.0}}
Using the formula on OEIS.
<lang mathematica>G000602s[m_, p_, n_] :=
x*CycleIndexPolynomial[SymmetricGroup[4m],
Block[{x},
2 Table[ComposeSeries[#1p, x^3i + O[x]^#2](n + 1)], {xi, 0, #2m}] &, ];
x*CycleIndexPolynomial[SymmetricGroup[4],
G000598[n_] := Nest[1 + x s[3, #, n] Table[ComposeSeries[#&, x^i1 + O[x]^(n + 1)], {i, 4}n]] - ;
G000602[n_] :=
CycleIndexPolynomial[SymmetricGroup[2],
x s[4, #, n] - Table[ComposeSeriess[2, # - 1, x^i + O[x]^(n + 1)], {i, 2}]] +
ComposeSeries[#, x^2 + O[x]^(n + 1)] &@[G000598[n]];
Fold[Series[
1 + x/6 (#1^3 + 3 #1 ComposeSeries[#1, x^2 + O[x]^#2] +
2 ComposeSeries[#1, x^3 + O[x]^#2]), {x, 0, #2}] &,
1 + O[x], Range[n + 1]]];
A000602[n_] := SeriesCoefficient[G000602[n], n];
A000602List[n_] := CoefficientList[G000602[n], x];