## You are here

Homederivation of Euler phi-function

## Primary tabs

# derivation of Euler phi-function

In this “proof” we will construct the solution for the Euler phi-function, $\phi(n)=n\prod_{{p|n}}(1-\frac{1}{n})$.

We will do this for the natural number $n>0$. Keep in mind that $\gcd(a,n)=1\Longleftrightarrow$ $a$ is not divisible by $p$ for all primes $p$ dividing $n$.

Let $n\geq 2$ and $p_{1},p_{2},\cdots,p_{r}$ be all prime divisors of n. Let $N=\{a\mid 0\leq a<n,\gcd(a,n)=1\}$ and $A_{i}:=\{a\mid 0\leq a<n,p_{i}|a\}$. If $J\subset\{1,2,\cdots,r\}$ than $p_{J}:=\prod_{{j\in J}}p_{i}$.

Thus, $\#(A_{J})=\#(\bigcap_{{j\in J}}A_{j})=\#(\{a\in A:p_{J}|a\})=\frac{n}{p_{J}}$

Using inclusion-exclusion,

$\displaystyle\phi(n)=\#(N)=\sum_{{J\subset\{1,2,\cdots,r\}}}(-1)^{{\#(J)}}\#(A% _{J})=\sum_{{J\subset\{1,2,\cdots,r\}}}(-1)^{{\#(J)}}\frac{n}{p_{J}}=n\sum_{{J% \subset\{1,2,\cdots,r\}}}(-1)^{{\#(J)}}\frac{1}{p_{J}}$ | |||

$\displaystyle=n(1-(\frac{1}{p_{1}}+\frac{1}{p_{2}}+\cdots+\frac{1}{p_{r}})+% \cdots(-1)^{r}\frac{1}{p_{1}p_{2}\cdots p_{r}})=n\prod_{{p|n}}(1-\frac{1}{p}).$ |

$\Box$

Major Section:

Reference

Type of Math Object:

Derivation

Parent:

## Mathematics Subject Classification

11-00*no label found*

- Forums
- Planetary Bugs
- HS/Secondary
- University/Tertiary
- Graduate/Advanced
- Industry/Practice
- Research Topics
- LaTeX help
- Math Comptetitions
- Math History
- Math Humor
- PlanetMath Comments
- PlanetMath System Updates and News
- PlanetMath help
- PlanetMath.ORG
- Strategic Communications Development
- The Math Pub
- Testing messages (ignore)

- Other useful stuff

## Recent Activity

Apr 22

new question: Prove that for any sets A, B, and C, An(BUC)=(AnB)U(AnC) by St_Louis

Apr 20

new image: information-theoretic-distributed-measurement-dds.png by rspuzio

new image: information-theoretic-distributed-measurement-4.2 by rspuzio

new image: information-theoretic-distributed-measurement-4.1 by rspuzio

new image: information-theoretic-distributed-measurement-3.2 by rspuzio

new image: information-theoretic-distributed-measurement-3.1 by rspuzio

new image: information-theoretic-distributed-measurement-2.1 by rspuzio

Apr 19

new collection: On the Information-Theoretic Structure of Distributed Measurements by rspuzio

Apr 15

new question: Prove a formula is part of the Gentzen System by LadyAnne

Mar 30

new question: A problem about Euler's totient function by mbhatia

new question: Prove that for any sets A, B, and C, An(BUC)=(AnB)U(AnC) by St_Louis

Apr 20

new image: information-theoretic-distributed-measurement-dds.png by rspuzio

new image: information-theoretic-distributed-measurement-4.2 by rspuzio

new image: information-theoretic-distributed-measurement-4.1 by rspuzio

new image: information-theoretic-distributed-measurement-3.2 by rspuzio

new image: information-theoretic-distributed-measurement-3.1 by rspuzio

new image: information-theoretic-distributed-measurement-2.1 by rspuzio

Apr 19

new collection: On the Information-Theoretic Structure of Distributed Measurements by rspuzio

Apr 15

new question: Prove a formula is part of the Gentzen System by LadyAnne

Mar 30

new question: A problem about Euler's totient function by mbhatia