Trouble with Totient

What is the smallest value of the Euler's totient function ϕ ( n ) \phi (n) for integers n 500 n\geq 500 ?

Details and assumptions

The Euler's totient function ϕ ( n ) \phi(n) is defined as the number of positive integers less than n n that are coprime to n n .


The answer is 128.

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.

8 solutions

Let N = i p i q i N = \prod_i p_i^{q_i} where p i p_i are distinct primes. Then we have ϕ ( N ) = i p i q i 1 ( p i 1 ) \phi(N)=\prod_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 ) \phi(N) is at least ( 2 1 ) × ( 3 1 ) × ( 5 1 ) × ( 7 1 ) × ( 11 1 ) = 480 (2-1)\times(3-1)\times(5-1)\times(7-1)\times(11-1)=480 . Hence, for a lower value of ϕ ( N ) \phi(N) , we should have at most 4 distinct prime factors.

Now, ϕ ( N ) N = i ( 1 1 p i ) \frac{\phi(N)}{N}=\prod_i (1-\frac{1}{p_i}) . Hence, with 3 or less distinct primes, the lowest value of ϕ ( N ) \phi(N) that we can hope to achieve is 500 × 1 2 × 2 3 × 4 5 = 133 500\times\frac{1}{2}\times\frac{2}{3}\times\frac{4}{5}=133 . However, with 4 distinct primes, we can go better. In particular, 510 = 2 × 3 × 5 × 17 510=2\times3\times5\times17 gives ϕ = 1 × 2 × 4 × 16 = 128 \phi=1\times2\times4\times16=128 .

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 ) \phi(N) to be lower, it should be made out of primes from { 2 , 3 , 5 , 7 , 11 , 13 } \{2,3,5,7,11,13\} 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 ) \phi(N) greater than 128.

Finding the answer is relatively easy. Justifying it is much harder, as it requires getting concrete restrictions on the prime decomposition of a possible counterexample.

Calvin Lin Staff - 7 years ago
Calvin Lin Staff
May 13, 2014

Suppose n = p 1 k 1 p 2 k 2 . . . p m k m n=p_1^{k_1}p_2^{k_2}...p_m^{k_m} , where p i p_i are distinct primes and k i 1. k_i\geq 1. The well-known formula for ϕ ( n ) \phi(n) is ϕ ( n ) = ( p 1 k 1 1 ( p 1 1 ) ) . . . ( p m k m 1 ( p m 1 ) ) = n ( p 1 1 p 1 . . . p m 1 p m ) . \phi(n)=\left( p_1^{k_1-1}(p_1-1)\right) \cdot... \cdot \left( p_m^{k_m-1}(p_m-1)\right) = n\cdot \left( \frac{p_1-1}{p_1}\cdot ...\cdot \frac{p_m-1}{p_m} \right).

Check that for n = 510 = 2 3 5 17 n=510=2\cdot 3 \cdot 5 \cdot 17 we have ϕ ( n ) = 1 2 4 16 = 128. \phi(n)=1 \cdot 2 \cdot 4 \cdot 16 = 128. We will prove that this is the smallest possible value.

If n 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 ) ( 11 1 ) = 480. \phi(n)\geq (p_1-1)\cdot...\cdot (p_5-1) \geq (2-1)(3-1)(5-1)(7-1)(11-1)=480.

If n n is divisible by three or fewer primes, then ϕ ( n ) n ( 2 1 2 3 1 3 5 1 5 ) 500 4 15 = 400 3 > 128 \phi(n)\geq n\left(\frac{2-1}{2}\cdot \frac{3-1}{3}\cdot \frac{5-1}{5} \right) \geq 500 \cdot\frac{4}{15}=\frac{400}{3} >128

So, if ϕ ( n ) < 128 \phi(n)<128 and n 500 , n\geq 500, p p is divisible by exactly four primes. We will prove that three of these primes are 2 , 2, 3 , 3, and 5 5 . Indeed, if 5 5 does not divide n n , then

ϕ ( n ) 500 2 1 2 3 1 3 7 1 7 11 1 11 = 10000 77 > 128. \phi(n)\geq 500\cdot \frac{2-1}{2} \cdot \frac{3-1}{3} \cdot \frac{7-1}{7}\cdot \frac{11-1}{11} = \frac{10000}{77} > 128.

When 2 2 or 3 3 do not divide n , n, we obtain the same inequalities. This shows n n is a product of some powers of 2 , 2, 3 , 3, 5 , 5, and some prime p 7 p\geq 7 . If p 2 n , p^2 \mid n, then ϕ ( n ) ( 2 1 ) ( 3 1 ) ( 5 1 ) ( p 1 ) p 8 42 > 128. \phi(n)\geq (2-1)(3-1)(5-1)\cdot (p-1)p\geq 8\cdot 42 >128. So n = 2 3 5 p d , n=2\cdot 3 \cdot 5 \cdot pd, where d d is only divisible by primes up to 5 5 . Clearly, for such n n ϕ ( n ) = n 2 1 2 3 1 3 5 1 5 p 1 p = 8 ( p 1 ) d \phi(n)=n\cdot\frac{2-1}{2} \cdot \frac{3-1}{3} \cdot \frac{5-1}{5} \cdot \frac{p-1}{p} = 8 \cdot (p-1)d

If ϕ ( n ) < 128 , \phi(n)<128, then ( p 1 ) d < 16. (p-1)d < 16. Since p 7 , p\geq 7, this implies d = 1 d=1 or d = 2. d=2. Because n 500 , n\geq 500, p d 500 30 > 16. pd\geq \frac{500}{30} >16. So if d = 2 , d=2, p 11 , p\geq 11, thus ( p 1 ) d > 20 , (p-1)d >20, contradiction. Similarly, if d = 1 , d=1, then p 17 , p\geq 17, so ( p 1 ) d 16. (p-1)d \geq 16.

Therefore, the smallest possible value of ϕ ( n ) \phi(n) for n 500 n\geq 500 is 128. 128.

Brilliant! God knows from when will my reasoning and approximation abilities will be so intense . . ? . .!!

Chandrachur Banerjee - 6 years, 5 months ago

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 not at all clear that the number should be square-free, because the condition n>500 may prevent us from removing extra powers of primes.

Calvin Lin Staff - 7 years ago
Philip Sun
May 20, 2014

It is well known that if n n has prime factors p 1 , p 2 , . . . , p k p_1, p_2, ... , p_k , then ϕ ( n ) = n i = 1 k p i 1 p i \phi(n)=n\displaystyle\prod\limits_{i=1}^k \frac{p_i-1}{p_i} . We can move some terms to get n = ϕ ( n ) i = 1 k p i 1 p i = ϕ ( n ) i = 1 k p i p i 1 n=\frac{\phi(n)}{\displaystyle\prod\limits_{i=1}^k \frac{p_i-1}{p_i}}=\phi(n)\displaystyle\prod\limits_{i=1}^k \frac{p_i}{p_i-1} . All primes are odd other than 2 2 , so p i 1 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 ) \phi(n) must contain a large number of 2 2 's. If ϕ ( n ) \phi(n) is a power of two, we find that it must be 128 128 so that n = 128 × 2 1 × 3 2 × 5 4 × 17 16 = 510 n=128\times\frac{2}{1}\times\frac{3}{2}\times\frac{5}{4}\times\frac{17}{16}=510 . This turns out to be the answer. To be rigorous, we try other combinations. If ϕ ( n ) \phi(n) is not a power of two, we could also use the multipliers 7 6 , 11 10 , \frac{7}{6}, \frac{11}{10}, and 13 12 \frac{13}{12} . Using any one of these multipliers along with 2 1 × 3 2 × 5 4 \frac{2}{1}\times\frac{3}{2}\times\frac{5}{4} (which we can assume to be used because they increase n n by so much) will result in n < 500 n<500 , while using more than one of these multipliers results in a ϕ ( n ) > 128 \phi(n)>128 . Therefore, our answer is 128 \boxed{128} .

" along with 2 1 × 3 2 × 5 4 \frac{2}{1}\times\frac{3}{2}\times\frac{5}{4} (which we can assume to be used because they increase n n by so much)" The justification is very non-rigorous, but the idea is interesting.

Calvin Lin Staff - 7 years ago
Tristan Jones
May 20, 2014

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.

"First I found the smallest multiple of 4 primes above 500." Absolutely not clear why this should work (coincidence, really).

Calvin Lin Staff - 7 years ago
Kumar Ishu
May 20, 2014

I used the following code in the C language for solving the problem:

include<iostream>

include<math.h>

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;
}

Computer-based solutions cannot be accepted. Clearly, there is no proof here, with an ad hoc upper bound on n.

Calvin Lin Staff - 7 years ago

Log in to reply

Yeah. This is outrageous.

Chandrachur Banerjee - 6 years, 5 months ago
Colin Hinde
May 20, 2014

we search for a number n 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.

Correct answer, but no proof

Calvin Lin Staff - 7 years ago
Idham Muqoddas
May 20, 2014

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.

We asked to minimize \phi(n), not n

Calvin Lin Staff - 7 years ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...