totient function by PaulĂ´

f(n){int q=2;for(;q*q<=n;q++)if(n%q==0){if(n/q%q==0)return q*f(n/q);return(q-1)*f(n/q);}return n-1;}\x0d
main(n){for(n=10000;n<10301;printf("%d\n",f(n)),n++);}\x0d
\x0d
\x0d

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

download

return top