totient function by leonid

require'mathn'
$$.upto(10300){|x|x.prime_division.map{|k,|x-=x/k};p x}

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

download

return to the top page