What is the smallest value of the Euler's totient function ϕ ( n ) for integers n ≥ 5 0 0 ?
Details and assumptions
The Euler's totient function ϕ ( n ) is defined as the number of positive integers less than n that are coprime to n .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Suppose n = p 1 k 1 p 2 k 2 . . . p m k m , where p i are distinct primes and k i ≥ 1 . The well-known formula for ϕ ( n ) is ϕ ( n ) = ( p 1 k 1 − 1 ( p 1 − 1 ) ) ⋅ . . . ⋅ ( p m k m − 1 ( p m − 1 ) ) = n ⋅ ( p 1 p 1 − 1 ⋅ . . . ⋅ p m p m − 1 ) .
Check that for n = 5 1 0 = 2 ⋅ 3 ⋅ 5 ⋅ 1 7 we have ϕ ( n ) = 1 ⋅ 2 ⋅ 4 ⋅ 1 6 = 1 2 8 . We will prove that this is the smallest possible value.
If n is divisible by five or more distinct primes, then ϕ ( n ) ≥ ( p 1 − 1 ) ⋅ . . . ⋅ ( p 5 − 1 ) ≥ ( 2 − 1 ) ( 3 − 1 ) ( 5 − 1 ) ( 7 − 1 ) ( 1 1 − 1 ) = 4 8 0 .
If n is divisible by three or fewer primes, then ϕ ( n ) ≥ n ( 2 2 − 1 ⋅ 3 3 − 1 ⋅ 5 5 − 1 ) ≥ 5 0 0 ⋅ 1 5 4 = 3 4 0 0 > 1 2 8
So, if ϕ ( n ) < 1 2 8 and n ≥ 5 0 0 , p is divisible by exactly four primes. We will prove that three of these primes are 2 , 3 , and 5 . Indeed, if 5 does not divide n , then
ϕ ( n ) ≥ 5 0 0 ⋅ 2 2 − 1 ⋅ 3 3 − 1 ⋅ 7 7 − 1 ⋅ 1 1 1 1 − 1 = 7 7 1 0 0 0 0 > 1 2 8 .
When 2 or 3 do not divide n , we obtain the same inequalities. This shows n is a product of some powers of 2 , 3 , 5 , and some prime p ≥ 7 . If p 2 ∣ n , then ϕ ( n ) ≥ ( 2 − 1 ) ( 3 − 1 ) ( 5 − 1 ) ⋅ ( p − 1 ) p ≥ 8 ⋅ 4 2 > 1 2 8 . So n = 2 ⋅ 3 ⋅ 5 ⋅ p d , where d is only divisible by primes up to 5 . Clearly, for such n ϕ ( n ) = n ⋅ 2 2 − 1 ⋅ 3 3 − 1 ⋅ 5 5 − 1 ⋅ p p − 1 = 8 ⋅ ( p − 1 ) d
If ϕ ( n ) < 1 2 8 , then ( p − 1 ) d < 1 6 . Since p ≥ 7 , this implies d = 1 or d = 2 . Because n ≥ 5 0 0 , p d ≥ 3 0 5 0 0 > 1 6 . So if d = 2 , p ≥ 1 1 , thus ( p − 1 ) d > 2 0 , contradiction. Similarly, if d = 1 , then p ≥ 1 7 , so ( p − 1 ) d ≥ 1 6 .
Therefore, the smallest possible value of ϕ ( n ) for n ≥ 5 0 0 is 1 2 8 .
Brilliant! God knows from when will my reasoning and approximation abilities will be so intense . . ? . .!!
For a number n, Euler totient function \phi(n) returns the number of factors of n that are coprime to n. The fundamental theorem of arithmetic states that if n>1 n can be written as n= p 1^(k 1)\cdotp 2^(k 2)\cdotp 3^(k 3)\ldotsp n^(k r) where p 1,p 2,p 3,\ldots are prime numbers and k 1,k 2,k 3,\ldots are powers of prime numbers and each k i\geq1. \phi(n)= p 1^(k 1)[1-\frac {1}{p 1}]\cdot p 2^(k 2)[1-\frac {1}{p 2}]\cdot\ldots p n^(k n)[1-\frac {1}{p r}]. =p 1^(k 1)\cdotp 2^(k 2)\ldotsp n^(k r)[1-\frac{1}{p 1}][1-\frac{1}{p 2}]\ldots[1-\frac{1}{p r}. =p 1^(k 1-1)\cdotp 2^(k 2-1)\cdotp 3^(k 3-1)\ldotsp r^(k r-1)(p 1-1)\cdot(p 2-1)\cdot\ldots(p r-1) We want the least value of \phi(n) it is possible if k 1-1=0, k 2-1=0, \ldots\ldots, k r-1=0 That is if k 1=1, k 2=1, k 3=1, \ldots k r=1. So \phi(n)= (p 1-1)(p 2-1)(p 3-1)\ldots(p r-1). Therefore for n to be a mere product of prime numbers i.e, k 1=1,k 2=1,\ldots k r=1 for n=510, n=2\cdot3\cdot5\cdot17 which is the least number with mere product of prime numbers i.e, k 1=1,k 2=1,k 3=1,k 4=1; Calculating the \phi(510) we get 128 which is least.
It is well known that if n has prime factors p 1 , p 2 , . . . , p k , then ϕ ( n ) = n i = 1 ∏ k p i p i − 1 . We can move some terms to get n = i = 1 ∏ k p i p i − 1 ϕ ( n ) = ϕ ( n ) i = 1 ∏ k p i − 1 p i . All primes are odd other than 2 , so p i − 1 is even. Because there are so many even numbers in the denominator of the product, and the numerators in the product are odd, ϕ ( n ) must contain a large number of 2 's. If ϕ ( n ) is a power of two, we find that it must be 1 2 8 so that n = 1 2 8 × 1 2 × 2 3 × 4 5 × 1 6 1 7 = 5 1 0 . This turns out to be the answer. To be rigorous, we try other combinations. If ϕ ( n ) is not a power of two, we could also use the multipliers 6 7 , 1 0 1 1 , and 1 2 1 3 . Using any one of these multipliers along with 1 2 × 2 3 × 4 5 (which we can assume to be used because they increase n by so much) will result in n < 5 0 0 , while using more than one of these multipliers results in a ϕ ( n ) > 1 2 8 . Therefore, our answer is 1 2 8 .
First I found the smallest multiple of 4 primes above 500. This is 510 (2x3x5x13).
Of the first 510 numbers 255 are multiples of 2 so I deducted this from 510.
Next I needed to remove the multiples of 3 that are not also multiples of 2. This was 510/6=85. The multiples of 5 were removed next but only 1 in every 3 needed removing as the second and third had already been eliminated. i.e. 510/5=102, then 1/3 or 102=34. The last multiples I needed consider were those of 17, The last prime multiple of 17 before going over 510 is the 29th so I counted how many multiples of 17 needed to be removed (the 1st, 7th, 11th, 13th, 17th, 19th, 23rd and 29th - the others having been removed already). So there are 8.
Finally, I subtracted all these form 510. 510-255-85-34-8=128 which was the answer.
I used the following code in the C language for solving the problem:
using namespace std;
int gcd(int a, int b)
{
while((b%a)!=0)
{
int c = b % a;
b = a;
a = c;
}
return a;
}
int main()
{
int m = 10000;
for(int i = 500; i<10000; i++)
{
int k=0;
for(int j = 1; j<=i; j++)
{
if(gcd(j,i)==1) { k+=1; }
}
m = min(m,k);
}
cout << m;
}
we search for a number n that has as many different prime factors as possible, and is as close to 500 as possible without going under. After playing with the number for a while 2 3 5*17=510 seemed to be the best choice.
multiple some smallest prime numbers so that the return is bigger than 500 but closer to 500.
if we choose 2,3,5,7,11, the return of its multiplication is:
2×3×5×7×11= 2310.
but it is to far, so pick 4 prime numbers so that the return of its multiplication is close to and bigger than 500. We get 2,3,5,17.
2×3×5×17 = 510.
Problem Loading...
Note Loading...
Set Loading...
Let N = ∏ i p i q i where p i are distinct primes. Then we have ϕ ( N ) = ∏ i p i q i − 1 ( p i − 1 )
If N has at least 5 distinct prime factors, we see that the value of ϕ ( N ) is at least ( 2 − 1 ) × ( 3 − 1 ) × ( 5 − 1 ) × ( 7 − 1 ) × ( 1 1 − 1 ) = 4 8 0 . Hence, for a lower value of ϕ ( N ) , we should have at most 4 distinct prime factors.
Now, N ϕ ( N ) = ∏ i ( 1 − p i 1 ) . Hence, with 3 or less distinct primes, the lowest value of ϕ ( N ) that we can hope to achieve is 5 0 0 × 2 1 × 3 2 × 5 4 = 1 3 3 . However, with 4 distinct primes, we can go better. In particular, 5 1 0 = 2 × 3 × 5 × 1 7 gives ϕ = 1 × 2 × 4 × 1 6 = 1 2 8 .
It can be shown that this is indeed the lowest value possible. As shown earlier, a better solution, if it exists, should have exactly 4 distinct prime factors. For ϕ ( N ) to be lower, it should be made out of primes from { 2 , 3 , 5 , 7 , 1 1 , 1 3 } only. But it is easy to verify that any product made out of numbers from that set is either smaller than 500 or has ϕ ( N ) greater than 128.