Plz…can anyone explain me this and whats the use for it …I have read the topcoder but could not understand it…
number of positive integers less than or equal to n that are relatively prime to n(i.e gcd==1).
follow this link http://anup1pma.quora.com/one-side-Love-with-Mathematics-beginner-P
The totient function, denoted by phi(n) is defined as the number of positive integers (<=n) which are relatively prime i.e. they do not have any factor in common with n, where 1 is being counted as relatively prime with every number. Any such number(<=n) and co-prime with n is called a totative and hence the function is called totient function.
eg: phi(24) = 8 where the possible such numbers are 1,5,7,11,13,17,19,23.
For code and further details, look here.