x=10;
T=zeros(x,x);
for m=1:x;
T(m,1)=1;
end
T
for n=2:x;
for k=2:n;
s = 0;
for i=1:k-1;
//recursive definition of divisibility without using the mod function, table A051731 in the oeis.
s=s+T(n-i,k-1)-T(n-i,k);
end
T(n,k)=s;
end
end
T
//Mats Granvik email: mats.granvik(at)abo.fi

### Like this:

Like Loading...

*Related*