JavaScript (102 characters)
Requires support for arrow functions. This will work unmodified in JavaScript Shell or otherwise when print is changed to alert.
for(j=k=l=-~'',j=++j+j,j*=++j;j--;)print(k=(''+k).replace(RegExp('(.)\\'+l+'*','g'),(a,b)=>a.length+b))