How to calcultate the Euler phi function ϕ(n):$Wehavetheprimefactorizationofn=p1⋅p2⋅p3⋯ϕ(n)=n⋅(1−1p1)⋅(1−1p2)⋅(1−1p3)⋯
Example 1:n=6$Theprimefactorizationof6=2∗3=p1∗p2ϕ(6)=6⋅(1−12)⋅(1−13)ϕ(6)=6⋅12⋅23ϕ(6)=63ϕ(6)=2
Example 2:n=9$Theprimefactorizationof9=32=p21ϕ(9)=9⋅(1−13)ϕ(9)=9⋅23ϕ(6)=3⋅2ϕ(6)=6
Example 3:n=7$Theprimefactorizationof7=7=p17$isaprimenumber!$ϕ(7)=7⋅(1−17)ϕ(7)=7⋅67ϕ(7)=6
Example 4:n=11$Theprimefactorizationof11=11=p111$isaprimenumber!$ϕ(11)=11⋅(1−111)ϕ(11)=11⋅1011ϕ(11)=10
\boxed{\text{ In general $ \phi(p) = p-1 $, if p is a prime number }}\\\\ \begin{array}{lr} p = 2: &\phi(2) = 1 \qquad =(2-1)\\ p = 3: &\phi(3) = 2 \qquad =(3-1)\\ p = 5: &\phi(5) = 4 \qquad =(5-1)\\ p = 7: &\phi(7) = 6 \qquad =(7-1)\\ p = 11: &\phi(11) = 10 \qquad =(11-1)\\ p = 13: &\phi(13) = 12 \qquad =(13-1)\\ \cdots & \phi(p) = p-1 \end{array}
The first 99 values of the Phi function are:
![]() | +0 | +1 | +2 | +3 | +4 | +5 | +6 | +7 | +8 | +9 |
---|---|---|---|---|---|---|---|---|---|---|
0+ | 1 | 1 | 2 | 2 | 4 | 2 | 6 | 4 | 6 | |
10+ | 4 | 10 | 4 | 12 | 6 | 8 | 8 | 16 | 6 | 18 |
20+ | 8 | 12 | 10 | 22 | 8 | 20 | 12 | 18 | 12 | 28 |
30+ | 8 | 30 | 16 | 20 | 16 | 24 | 12 | 36 | 18 | 24 |
40+ | 16 | 40 | 12 | 42 | 20 | 24 | 22 | 46 | 16 | 42 |
50+ | 20 | 32 | 24 | 52 | 18 | 40 | 24 | 36 | 28 | 58 |
60+ | 16 | 60 | 30 | 36 | 32 | 48 | 20 | 66 | 32 | 44 |
70+ | 24 | 70 | 24 | 72 | 36 | 40 | 36 | 60 | 24 | 78 |
80+ | 32 | 54 | 40 | 82 | 24 | 64 | 42 | 56 | 40 | 88 |
90+ | 24 | 72 | 44 | 60 | 46 | 72 | 32 | 96 | 42 | 60 |
what is Φ6?
\!\ \varphi(6) = 2. \qquad 1 \text{ and } 5 \\\\ 6 = 2 \cdot 3\\ \!\ \varphi(6)}=6\cdot (1-\frac{1}{2})( 1-\frac{1}{3} )}=2
Heureka, could you (or someone else) explain the phi function to me please?
I thought phi was an irrational number like pi.
Hello Melody,
\\\mathbf{De{finition:}}\\ \begin{text} L{et} $ n \ge 1$ be an integer. Then we de{fine} the \\ \textit{Euler phi function} $\phi$ by\\ $\phi(n)=$ the number of positive integers \\ less than $n$ that are relatively prime to $n$ \end{text}
\\\mathbf{Relatively Prime:}\\ $ \begin{text} Describes two numbers for which\\ the only common factor is 1. \\ In other words, relatively prime numbers have\\ a greatest common factor $(gcf)$ of $1$. \\ For example, $6$ and $35$ are relatively prime $(gcf = 1)$.\\ The numers $6$ and $8$ are not relatively prime $(gcf = 2)$. \end{text}
Example 1:n=6$andnisnotaprimenumber$\samll 1gcf(6,1)=12gcf(6,2)=23gcf(6,3)=34gcf(6,4)=25gcf(6,5)=16gcf(6,6)=6 6 has 2 relative primes 1 and 5 see the red color. So ϕ(6)=2
Example 2:n=9$andnisnotaprimenumber$\samll 1gcf(9,1)=12gcf(9,2)=13gcf(9,3)=34gcf(9,4)=15gcf(9,5)=16gcf(9,6)=37gcf(9,7)=18gcf(9,8)=19gcf(9,9)=9 9 has 6 relative primes 1,2,4,5,7,8 see the red color. So ϕ(9)=6
Example 3:n=7$andnisaprimenumber$\samll 1gcf(7,1)=12gcf(7,2)=13gcf(7,3)=14gcf(7,4)=15gcf(7,5)=16gcf(7,6)=17gcf(7,7)=7 7 has 7−1=6 relative primes 1 until 6 see the red color. So ϕ(7)=6. So ϕ of a prime number ϕ(p)=p−1
I have a further question Heureka.
\!\ \varphi(6) = 2. \qquad 1 \text{ and } 5 \\\\ 6 = 2 \cdot 3\\ \!\ \varphi(6)}=6\cdot (1-\frac{1}{2})( 1-\frac{1}{3} )}=2
Now I do get why phi(6)=2
But what is it about from 6=2.3
What is the relvance of the brackets. How can this be used on other examples?
How to calcultate the Euler phi function ϕ(n):$Wehavetheprimefactorizationofn=p1⋅p2⋅p3⋯ϕ(n)=n⋅(1−1p1)⋅(1−1p2)⋅(1−1p3)⋯
Example 1:n=6$Theprimefactorizationof6=2∗3=p1∗p2ϕ(6)=6⋅(1−12)⋅(1−13)ϕ(6)=6⋅12⋅23ϕ(6)=63ϕ(6)=2
Example 2:n=9$Theprimefactorizationof9=32=p21ϕ(9)=9⋅(1−13)ϕ(9)=9⋅23ϕ(6)=3⋅2ϕ(6)=6
Example 3:n=7$Theprimefactorizationof7=7=p17$isaprimenumber!$ϕ(7)=7⋅(1−17)ϕ(7)=7⋅67ϕ(7)=6
Example 4:n=11$Theprimefactorizationof11=11=p111$isaprimenumber!$ϕ(11)=11⋅(1−111)ϕ(11)=11⋅1011ϕ(11)=10
\boxed{\text{ In general $ \phi(p) = p-1 $, if p is a prime number }}\\\\ \begin{array}{lr} p = 2: &\phi(2) = 1 \qquad =(2-1)\\ p = 3: &\phi(3) = 2 \qquad =(3-1)\\ p = 5: &\phi(5) = 4 \qquad =(5-1)\\ p = 7: &\phi(7) = 6 \qquad =(7-1)\\ p = 11: &\phi(11) = 10 \qquad =(11-1)\\ p = 13: &\phi(13) = 12 \qquad =(13-1)\\ \cdots & \phi(p) = p-1 \end{array}
The first 99 values of the Phi function are:
![]() | +0 | +1 | +2 | +3 | +4 | +5 | +6 | +7 | +8 | +9 |
---|---|---|---|---|---|---|---|---|---|---|
0+ | 1 | 1 | 2 | 2 | 4 | 2 | 6 | 4 | 6 | |
10+ | 4 | 10 | 4 | 12 | 6 | 8 | 8 | 16 | 6 | 18 |
20+ | 8 | 12 | 10 | 22 | 8 | 20 | 12 | 18 | 12 | 28 |
30+ | 8 | 30 | 16 | 20 | 16 | 24 | 12 | 36 | 18 | 24 |
40+ | 16 | 40 | 12 | 42 | 20 | 24 | 22 | 46 | 16 | 42 |
50+ | 20 | 32 | 24 | 52 | 18 | 40 | 24 | 36 | 28 | 58 |
60+ | 16 | 60 | 30 | 36 | 32 | 48 | 20 | 66 | 32 | 44 |
70+ | 24 | 70 | 24 | 72 | 36 | 40 | 36 | 60 | 24 | 78 |
80+ | 32 | 54 | 40 | 82 | 24 | 64 | 42 | 56 | 40 | 88 |
90+ | 24 | 72 | 44 | 60 | 46 | 72 | 32 | 96 | 42 | 60 |