totient function by kaki

(use srfi-42)(do-ec(: i 10000 10301)(print(* i(product-ec(:do((j 2))(>= i j)((+ j 1)))(if(and #0=(=(gcd i j)j)(while #0#(set! i(/ i j)))))(- 1(/ j))))))

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

download

return to the top page