- #1
76Ahmad
- 48
- 0
Hi all, a quistion about how to add the cofficients list to gether?
here is an example:
For[m = 2, m ≤ 4 , m++,
For[p = 2, p ≤ m^2, p++,
If[PrimeQ[p], Print[CoefficientList[PolynomialMod[Expand[(1 - x)^m], p], x]]]]]
{1,0,1}
{1,1,1}
{1,1,1,1}
{1,0,0,2}
{1,2,3,4}
{1,4,3,6}
{1,0,0,0,1}
{1,2,0,2,1}
{1,1,1,1,1}
{1,3,6,3,1}
{1,7,6,7,1}
{1,9,6,9,1}
How to add every grup of cofficients together?
the reuslt should be like that:
{2,1,2}
{4,7,7,13}
{6,22,19,22,6}
please help
here is an example:
For[m = 2, m ≤ 4 , m++,
For[p = 2, p ≤ m^2, p++,
If[PrimeQ[p], Print[CoefficientList[PolynomialMod[Expand[(1 - x)^m], p], x]]]]]
{1,0,1}
{1,1,1}
{1,1,1,1}
{1,0,0,2}
{1,2,3,4}
{1,4,3,6}
{1,0,0,0,1}
{1,2,0,2,1}
{1,1,1,1,1}
{1,3,6,3,1}
{1,7,6,7,1}
{1,9,6,9,1}
How to add every grup of cofficients together?
the reuslt should be like that:
{2,1,2}
{4,7,7,13}
{6,22,19,22,6}
please help