Mobius function from cosines and recurrence matrix

Mathematica 8

Clear[nn, t, n, k, a, b];
nn = 15;
t[n_, 1] = 1;
t[1, k_] = 1;
t[n_, k_] :=
t[n, k] =
If[n >= k, -Sum[t[n - i, k], {i, 1, k - 1}], -Sum[
t[k - i, n], {i, 1, n - 1}]];
MatrixForm[Table[Table[t[n, k], {k, 1, nn}], {n, 1, nn}]];
MatrixForm[
Table[Table[t[n, k]*Exp[I*2*Pi*k/n], {k, 1, n}], {n, 1, nn}]]
MatrixForm[
Chop[Table[
N[Total[Table[t[n, k]*Exp[I*2*Pi*k/n], {k, 1, n}]]], {n, 1, nn}]]]

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.