login
A158239
A triangle of coefficients Pseudo-Hadamard matrices as integer characteristic polynomials (the code and initial values are very long, but the basic recurrence is the Hadamard matrix self-similarity).
0
1, 1, -1, -2, 0, 1, -4, 2, 2, -1, 16, 0, -8, 0, 1, 32, -16, -16, 8, 2, -1, -128, 0, 80, 0, -16, 0, 1, -64, 32, 64, -32, -20, 10, 2, -1, 4096, 0, -2048, 0, 384, 0, -32, 0, 1, 12288, -4096, -6144, 2048, 1152, -384, -96, 32, 3, -1, -32768, 0, 20480, 0, -5120, 0, 640, 0, -40, 0
OFFSET
0,4
REFERENCES
F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting Codes, Elsevier/North Holland, 1978, pp. 44-48.
EXAMPLE
{1},
{1, -1},
{-2, 0, 1},
{-4, 2, 2, -1},
{16, 0, -8, 0, 1},
{32, -16, -16, 8, 2, -1},
{-128, 0, 80, 0, -16, 0, 1},
{-64, 32, 64, -32, -20, 10, 2, -1},
{4096, 0, -2048, 0, 384, 0, -32, 0, 1},
{12288, -4096, -6144, 2048, 1152, -384, -96, 32, 3, -1},
{-32768, 0, 20480, 0, -5120, 0, 640, 0, -40, 0, 1},
{32768, 32768, -20480, -20480, 5120, 5120, -640, -640, 40, 40, -1, -1},
{-2985984, -2488320, -1824768, -760320, -253440, -46464, 0, 3872, 1760, 440, 88, 10, 1}
MATHEMATICA
(* source: uses Chinese student's code as base: http://blade100.math.scu.edu.tw/~u9217/hw3.nb *)
MatrixJoinH[A_, B_] := Transpose[Join[Transpose[A], Transpose[B]]] KroneckerProduct[M_, N_] := Module[{M1, N1, LM, LN, N2}, M1 = M; N1 = N; LM = Length[M1]; LN = Length[N1]; Do[M1[[i, j]] = M1[[i, j]]N1, {i, 1, LM}, {j, 1, LM}]; Do[M1[[i, 1]] = MatrixJoinH[M1[[i, 1]], M1[[i, j]]], {j, 2, LM}, {i, 1, LM}]; N2 = {}; Do[AppendTo[N2, M1[[i, 1]]], {i, 1, LM}]; N2 = Flatten[N2]; Partition[N2, LM*LN, LM*LN]];
HadamardMatrix[0] := {{0}};
HadamardMatrix[1] := {{1}}
HadamardMatrix[2] := {{1, 1},
{1, -1}};
HadamardMatrix[ 3] := {{2, 0, 0},
{0, 1, 1},
{0, 1, -1}};
HadamardMatrix[5] := {{2, 0, 0, 0, 0},
{0, 1, 1, 1, 1},
{0, 1, -1, 1, -1},
{0, 1, 1, -1, -1},
{0, 1, -1, -1, 1}};
HadamardMatrix[7] := {{1, 1, 0, 0, 0, 0, 0},
{1, -1, 0, 0, 0, 0, 0},
{0, 0, 2, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1},
{0, 0, 0, 1, -1, 1, -1},
{0, 0, 0, 1, 1, -1, -1},
{0, 0, 0, 1, -1, -1, 1}};
HadamardMatrix[9] := {{3, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1},
{0, 1, -1, 1, -1, 1, -1, 1, -1},
{ 0, 1, 1, -1, -1, 1, 1, -1, -1},
{0, 1, -1, -1, 1, 1, -1, -1, 1},
{0, 1, 1, 1, 1, -1, -1, -1, -1},
{0, 1, -1, 1, -1, -1, 1, -1, 1},
{0, 1, 1, -1, -1, -1, -1, 1, 1},
{0, 1, -1, -1, 1, -1, 1, 1, -1}};
HadamardMatrix[11] := {{2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{2, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1},
{0, 0, 1, -1, 1, -1, 0, 1, -1, 1, -1},
{0, 0, 1, 1, -1, -1, 0, 1, 1, -1, -1},
{0, 0, 1, -1, -1, 1, 0, 1, -1, -1, 1},
{0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 0, -1, -1, -1, -1},
{0, 0, 1, -1, 1, -1, 0, -1, 1, -1, 1},
{0, 0, 1, 1, -1, -1, 0, -1, -1, 1, 1},
{0, 0, 1, -1, -1, 1, 0, -1, 1, 1, -1}};
HadamardMatrix[12] := {{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1},
{1, -1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1},
{1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1},
{1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1},
{1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1},
{ 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1},
{1, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1},
{1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1},
{1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1},
{1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1},
{1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1}};
HadamardMatrix[n_] := Module[{m}, m = {{1, 1}, {1, -1}}; KroneckerProduct[m, HadamardMatrix[n/2]]];
Table[HadamardMatrix[n], {n, 0, 12}];
Table[HadamardMatrix[n].Transpose[HadamardMatrix[n]], {n, 0, 12}];
Table[CharacteristicPolynomial[HadamardMatrix[n], x], {n, 1, 12}];
a = Join[{{1}}, Table[CoefficientList[CharacteristicPolynomial[HadamardMatrix[n], x], x], {n, 1, 12}]];
Flatten[%]
Table[Apply[Plus, a[[n]]], {n, 1, Length[a]}];
CROSSREFS
Sequence in context: A316273 A124915 A322084 * A159819 A030188 A176703
KEYWORD
sign,tabl,uned
AUTHOR
Roger L. Bagula, Mar 14 2009
STATUS
approved