#PHP, 52 bytes 
    <?while($k++<$argv[1]+2){while(--$j>0)echo$j;$j=$k;}