eulers function
The no. of natural Numbers ≤ 2012 which are relatively prime to 2012 is :
-
UP 0 DOWN 0 0 7
7 Answers
You mean Euler's Totient Function or Phi Function.
Many thanks. I had read it earlier but forgotten it. thanks and thanks !
2012= 22*503
no. of factors = (2+1)(1+1) -1 =5 (excluding 1)
hence no. of natural nos. prime to 2012= 2012-5 =2007
@Aditya you have found out the no. of natural numbers which do not divide 2012. But you had to find the no. of natural nos. which are relatively prime to 2012.
For ex- 8 does not divide 2012 but gcd(8,2012)≠1
oh. sorry misread the question.
reqd number = 2012 - [2012/2] - [2012/503] = 2012-1006-4 = 1002
@Aditya Your value is wrong. φ(2012)=1004 not 1002
In your calculation you have subtracted the numbers which is divisible by both 2 and 503 twice. By Inclusion exclusion it should be 2012-[2012/2]-[2012/503]+[2012/1006]=1004