Euler’s Totient Function of a number n, i.e phi(n), is the number of numbers lesser than n, that are co-prime to n.
Computing phi(n)
Precomputing phi using Sieve
Precomputing phi using Linear Sieve
References
https://cp-algorithms.com/algebra/phi-function.html
https://codeforces.com/blog/entry/54090