Practical Numbers by shinh

p 1
2.step(500,2){|n|x=1
o=n
2.upto(n-1){|i|c=i
(n/=i
c*=i)while n%i<1
i>1+x&&o=p
x*=~-c/~-i}
o&&p(o)}

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

download

return top