10 ' cp_sub.ub 20 ' phi(n) = pi (d|n) (x^d - 1)^mu(n\d) 30 input "n=";N%:input "x=";X% 40 R=fnPhi(N%,X%):print R 50 goto 30 60 ' 70 fnPhi(N%,X%) 80 local D%,R 90 R=1 100 for D%=1 to N% 110 if N%@D%=0 then R=R*(X%^D%-1)^moeb(N%\D%):print D%,moeb(N%\D%) 120 next D% 130 return(R)