Lucky numbers by m.ukai

let rec(^)l i=i>0&i::l^i-2;!1@l
and(!)n=Printf.printf"%d "n;n
and(@)n l=n+1@h!(List.nth l n)1[]l
and h p i m=function a::b->h p(i+1)[|a::m;m|].(i/p*p/i)b|_->List.rev m;;[]^9999

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

download

return to the top page