%Hey. Contact redheffer at optoutofdatabases dot 33mail dot com if you have questions. This is very poorly documented. I know. Forgive me. Also, the coding style is terrible and I'm wanted in New Jersey for fraud.

function [M,A,F,U]=dirichletMatrices(n)
%Calculates all the bare minimum necessary dirichlet matrices in the seventh writeup.
U=triu(ones(n));
M=zeros(n);
A=M;
F=M;
for i=1:n
for j=1:n
if j/i==floor(j/i)
M(i,j)=mobius(floor(j/i));
A(i,j)=1;
end;
F(i,j)=floor(j/i);
end;
end;