## 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

Oct 21

new question: Prime numbers out of sequence by Rubens373

Oct 7

new question: Lorenz system by David Bankom

Oct 19

new correction: examples and OEIS sequences by fizzie

Oct 13

new correction: Define Galois correspondence by porton

Oct 7

new correction: Closure properties on languages: DCFL not closed under reversal by babou

new correction: DCFLs are not closed under reversal by petey

Oct 2

new correction: Many corrections by Smarandache

Sep 28

new question: how to contest an entry? by zorba

new question: simple question by parag

new question: Prime numbers out of sequence by Rubens373

Oct 7

new question: Lorenz system by David Bankom

Oct 19

new correction: examples and OEIS sequences by fizzie

Oct 13

new correction: Define Galois correspondence by porton

Oct 7

new correction: Closure properties on languages: DCFL not closed under reversal by babou

new correction: DCFLs are not closed under reversal by petey

Oct 2

new correction: Many corrections by Smarandache

Sep 28

new question: how to contest an entry? by zorba

new question: simple question by parag