Related

totient(55);

Calculate

totient

totient(16402499);

Calculate

totient

totient(3440669);

Calculate

totient

totient(3403847);

Calculate

totient(510510);

Calculate

totient (50);

Calculate

totient(25);

Calculate

totient

totient(3403847);

Calculate

totient

totient(21012324234);

Calculate

totient(39);

Calculate

totient

Run Example
```(%i1)p:next_prime(5762875673845);
(%o1)                            5762875673869
(%i2) primep(5762875673869);
(%o2)                                true
a b
(%o3)            nod(a, b) := block(load("functs"), ---------)
lcm(a, b)
(%i4) a:56287583;
(%o4)                              56287583
(%i5) nod(a,p-1);
(%o5)                                  1
(%i6) x:power_mod(a,totient(p-1)-1,p-1);
(%o6)                            2602712920211
(%i7) ```
Run Example
```nod(a,b):=block(load("functs"),a*b/lcm(a,b));
a b
(%o1)            nod(a, b) := block(load("functs"), ---------)
lcm(a, b)
(%i2) q1:next_prime(846238423);
(%o2)                              846238447
(%i3) q2:next_prime(56432423);
(%o3)                              56432429
(%i4) q:q1*q2;
(%o4)                          47755291077397763
(%i5) totient(q);
(%o5)                          47755290174726888
(%i6) b:(7489);
(%o6)                                7489
(%i7) nod(b,totient(q));
(%o7)                                  1
(%i8) y:power_mod(b,totient(totient(47755291077397763))-1,47755290174726888);
(%o8)                          27655854384803113
(%i9) power_mod(777,12312342,242342342342342342);
(%o9)                         168240100700055475
(%i10) power_mod(777,y,q);
(%o10)                         6675441449460076
(%i11) ```
Run Example
```nod(a,b):=block(load("functs"),a*b/lcm(a,b));
a b
(%o1)            nod(a, b) := block(load("functs"), ---------)
lcm(a, b)
(%i2) p1:next_prime(999999999);
(%o2)                             1000000007
(%i3) p2:next_prime(999999999);
(%o3)                             1000000007
(%i4) p:p1*p2;
(%o4)                         1000000014000000049
(%i5) totient(p);
(%o5)                         1000000013000000042
(%i6) a:33331;
(%o6)                                33331
(%i7) nod(a,totient(p));
(%o7)                                  1
(%i8) x:power_mod(a,totient(p)-1,1000000013000000042);
(%o8)                         651482524022559989
(%i9) power_mod(69,5645,30654092751617);
(%o9)                           10639360659256
(%i10) ```

Help for Totient