Mertens function invariant

//Scilab (a Matlab clone)

x=10;  // size of matrix
T=zeros(x,x);

for n=1:x;
T(n,1)=1;
end
T;

for n=1:3;
  for k=1:n;
    T(n,k)=1;
  end
end
T;

// Random numbers here:
for n=4:x;
  T(n,1)=rand();
end
T;

for n=4:x;
  k=2;
  T(n,k)=T(n,k-1)-T(n-1,k);
end
T;

for n=4:x;
  k=3;
  T(n,k)=T(n,k-1)-(T(n-1,k)+T(n-2,k));
end
T;

for n=4:x;
  for k=4:n;
  s_one = 0;
    for i=1:k-2;
    s_one=s_one+T(n-i,k-1);
    end
  s_two = 0;
    for i=1:k-1;
    s_two=s_two+T(n-i,k);
    end
  T(n,k)=s_one-s_two;
  end
end
T

A = inv(T) // Mertens function in first columns of A
// Mats Granvik mats.granvik(AT)abo.fi
Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.