Lucky numbers by nn

a=[2]
for(i=-1;b=[],v=a[++i];a=b)for(j=0;u=i?a[j]:j+1,u<1e4;)++j%v&&b.push(u)
print.apply(0,a)

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

download

return to the top page