%I
%S 1,0,1,0,1,0,0,0,2,0,0,0,0,1,0,0,0,0,0,4,0,0,0,0,3,0,1,0,0,0,0,0,0,0,
%T 6,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,5,0,1
%N Triangle read by rows: coefficients of characteristic polynomials of the Z/nZ addition matrices using PolynomialMod[p(x,n),n] in Mathematica. ( Polynomials/nZ): P(x, n) = If[Mod[n, 4] == 0, x^n, If[Mod[n, 2] == 1, If[n == 0, 1, (n  1)*x^n], (n/2)x^(n  2) + x^n]].
%C Row sums are: {1, 0, 2, 2, 1, 4, 4, 6, 1, 8, 6, ...};
%F P(x, n) = If[Mod[n, 4] == 0, x^n, If[Mod[n, 2] == 1, If[n == 0, 1, (n  1)*x^n], (n/2)x^(n  2) + x^n]]; out_n,m=Coefficients(P(x,n)).
%e {1},
%e {0}, : Mathematica leaves out this zero in Flatten[];
%e {1, 0, 1},
%e {0, 0, 0, 2},
%e {0, 0, 0, 0, 1},
%e {0, 0, 0, 0, 0, 4},
%e {0, 0, 0, 0, 3, 0, 1},
%e {0, 0, 0, 0, 0, 0, 0, 6},
%e {0, 0, 0, 0, 0, 0, 0, 0, 1},
%e {0, 0, 0, 0, 0, 0, 0, 0, 0, 8},
%e {0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 1}
%t (* Polynomial form*) Clear[P, x]; P[x_, n_] :=P[x, n] = If[Mod[n, 4] ==0, x^n, If[Mod[n, 2] == 1, If[n == 0, 1, (n  1)*x^n], (n/2)x^(n  2) + x^n]]; g1 = Table[P[x, n], {n, 0, 10}] (* matrix form*) M[d_] := Table[Mod[n + m, d], {n, 0, d  1}, {m, 0, d  1}]; a = Join[{{1}}, Table[CoefficientList[PolynomialMod[Det[M[d]  x*IdentityMatrix[d]], d], x], {d, 1, 10}]]; Flatten[a]
%K nonn,uned,tabf
%O 1,9
%A _Roger L. Bagula_ and _Gary W. Adamson_, May 02 2008
