Totient by notogawa

m@main=readLn>>=print.(#2)>>m
n#p|n<p^2=n-1|mod n p<1=min(gcd(p^2)n-1)p*div n p#p|0<1=n#(p+1)

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

download

return to the top page