kill(all)$

van=facebook.com/LearningCalculus$

f(k):=sum(i*10^(k-i),i,1,k);
g(x):=sum(  10^(k-i),i,1,k);

f(k)-f(k-1)=g(k);

for k:2 thru 6 do
print(f(k),"-", f(k-1),"=",g(k))$