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

Jul 5

new correction: Error in proof of Proposition 2 by alex2907

Jun 24

new question: A good question by Ron Castillo

Jun 23

new question: A trascendental number. by Ron Castillo

Jun 19

new question: Banach lattice valued Bochner integrals by math ias

Jun 13

new question: young tableau and young projectors by zmth

Jun 11

new question: binomial coefficients: is this a known relation? by pfb

Jun 6

new question: difference of a function and a finite sum by pfb

new correction: Error in proof of Proposition 2 by alex2907

Jun 24

new question: A good question by Ron Castillo

Jun 23

new question: A trascendental number. by Ron Castillo

Jun 19

new question: Banach lattice valued Bochner integrals by math ias

Jun 13

new question: young tableau and young projectors by zmth

Jun 11

new question: binomial coefficients: is this a known relation? by pfb

Jun 6

new question: difference of a function and a finite sum by pfb