Euler Phi of a number

1.9k Views Asked by At

I saw an AIME problem where you took $\phi(1000)$ and then divided by $2$. The problem is here:

http://www.artofproblemsolving.com/community/u244443h580665p4722095

$\phi(1000)$ gives you how many numbers are coprime to $1000$ that are less than $1000$.

How do you know half of them are exactly less than $500$ and half are exactly over $500$?

2

There are 2 best solutions below

7
On

Because when $a$ is coprime to $1000$, $1000-a$ is also. So they come in pairs, one less than $500$ and the other more than $500$.

2
On

A helpful fact about the Euler phi function (I don't know if this fact is available to you) is that if a prime $p$ divides $n$, then $\varphi(pn)=p\varphi(n)$.

Thus $\varphi(1000)=\varphi(2\cdot 500)=2\varphi(500)$, which immediately gives your result.