Perl, &nbsp;<s>&nbsp;69&nbsp;</s> &nbsp;61
------------------------------------------

Updated version (thanks, *Dennis*!)

 $n=<>;for$i(1..$n){say"_".join"",map{$i%$_|$i==$_?_:$"}2..$n}

Original version:

 $n=<>;for$i(1..$n){say"_".join("",map{$i%$_||$i==$_?"_":" "}(2..$n))}