LCM of 1 to n by nn

{delete a
for(a[v=433]=i=1;j=i++<$0;){for(;i%++j;);for(;j>=i&&j<=$0;j*=i)for(k=v;a[k]_||c;c=int(c/10))a[k]=(c+=i*a[k--])%10}for(o=_;v;)o=a[v--]o}$0=o

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page