For how many integer values k does there exist a function f from the positive integers to the integers such that f ( 1 3 5 ) = 3 and for all pairs of positive integers ( m , n ) ,
f ( m n ) = f ( m ) + f ( n ) + k × f ( g c d ( m , n ) ) .
This problem is shared by Nicolae S . from the Czech and Slovak Republic Olympiad.
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.
Excellent! This actually goes beyond the original problem, really nice!
Excellent solution, with complete analysis of the problem!
I have another solution for 2nd case, it's obvious that f(x)=m.lnx, combine with f(135)=f(5)+(2k+1)f(3), we have k=1!
Log in to reply
Firstly, I am not saying in the second case that f ( m n ) = f ( m ) + f ( n ) for all m , n , just for coprime m , n (in my proof I mistakenly said that his made f multiplicative - it actually makes 2 f multiplicative). There are many more functions with this property than just multiples of the logarithm.
Secondly, the function is mean to take integer values for all integers, and no multiple of the logarithm will do that.
f ( 9 ) = f ( 3 ) + f ( 3 ) + k × f ( 3 ) = ( k + 2 ) × f ( 3 ) f ( 2 7 ) = f ( 3 ) + f ( 9 ) + k × f ( 3 ) = ( 2 k + 3 ) × f ( 3 ) f ( 8 1 ) = f ( 9 ) + f ( 9 ) + k × f ( 9 ) = ( k + 2 ) 2 × f ( 3 )
But also: f ( 8 1 ) = f ( 3 ) + f ( 2 7 ) + k × f ( 3 ) = ( 3 k + 4 ) × f ( 3 )
So ( k + 2 ) 2 = 3 k + 4 , hence k ( k + 1 ) = 0, so k = 0 or k = − 1 . For both values we can come up with a function that works:
k = 0 : f ( n ) is the number of factors 3 in n .
k = − 1 : f ( n ) is 3 when n is a multiple of 3 , and 0 otherwise.
Nice solution!
What happens if f ( 3 ) = 0 ?
m = n = 1 gives ( k + 1 ) f ( 1 ) = 0 .
Let p be a prime.
m = p a , n = p gives f ( p a + 1 ) = f ( p a ) + ( 1 + k ) f ( p ) . It is easy to see, by induction, that f ( p n ) = ( n + ( n − 1 ) k ) f ( p ) .
Further, let m = n = p 2 . We see that f ( p 4 ) = ( 2 + k ) f ( p 2 ) = ( 2 + k ) 2 f ( p ) .
Hence, f ( p ) ( ( 2 + k ) 2 − ( 4 + 3 k ) ) = 0 . Therefore, k = − 1 , k = 0 or f ( p ) = 0 for all p .
However, m = 2 7 , n = 5 gives 3 = 0 + 0 + k f ( 1 ) . Hence, f ( 1 ) is nonzero, so k = − 1 , which is one of the other cases. Hence, k = 0 or k = − 1 .
To show that k = 0 and k = − 1 both work, we can exhibit:
k = 0 gives f ( x ) = v 2 ( x ) , the index of the maximal power of 2 dividing x .
k = − 1 gives f ( x ) = 3 if 5 ∣ x , 0 otherwise.
It is easy to verify that these both work.
Nice answer. Small notes: You should not use n for two different variables in one paragraph. For k = − 1 you can also use f ( x ) = 3 for all x
Great solution!
The wording in a middle is a bit confusing: the " However, m = 2 7 ..." sentence refers to the case when all f ( p ) = 0 , but it has to be kind of guessed. The examples at the end are very nice!
Whoops, I just noticed that the k = 0 case should read " f ( x ) = v 3 ( x ) ".
Putting m = n , f ( m 2 ) = 2 f ( m ) + k f ( m ) = ( k + 2 ) f ( m )
Hence, f ( m 4 ) = ( k + 2 ) f ( m 2 ) = ( k + 2 ) 2 f ( m ) .....(1)
Again, f ( m 4 ) = f ( m ) + f ( m 3 ) + k f ( m ) = ( k + 1 ) f ( m ) + f ( m 3 )
Now, f ( m 3 ) = f ( m ) + f ( m 2 ) + k f ( m ) = ( k + 1 ) f ( m ) + ( k + 2 ) f ( m )
So, f ( m 4 ) = 2 ( k + 1 ) f ( m ) + ( k + 2 ) f ( m ) ......(2)
From (1) and (2),we get
( k + 2 ) 2 = 2 ( k + 1 ) + ( k + 2 )
or, 2 ( k + 1 ) = ( k + 2 ) ( k + 1 )
Hence, k + 1 = 0 i.e, k = − 1 or k + 2 = 2 i.e, k = 0 Using prime decomposition, f can be defined suitably for these values of k .
Let P ( m , n ) be the statement f ( m n ) = f ( m ) + f ( n ) + k f ( g cd ( m , n ) ) .
P ( m , 1 ) ⟹ f ( m ) = f ( m ) + f ( 1 ) + k f ( 1 ) ⟹ ( k + 1 ) f ( 1 ) = 0 , so either k = − 1 or f ( 1 ) = 0 .
Then let f ( n ) = 3 for all n . This function certainly satisfies P , as P ( m , n ) reduces to 3 = 3 + 3 + ( − 1 ) 3 ⟹ 3 = 3 , and it also satisfies f ( 1 3 5 ) = 3 . So k = − 1 is a solution.
P ( m , m ) ⟹ f ( m 2 ) = f ( m ) + f ( m ) + k f ( m ) = ( k + 2 ) f ( m )
P ( m 2 , m ) ⟹ f ( m 3 ) = f ( m 2 ) + f ( m ) + k f ( m ) = ( k + 2 ) f ( m ) + ( k + 1 ) f ( m ) = ( 2 k + 3 ) f ( m )
P ( m 3 , m ) ⟹ f ( m 4 ) = f ( m 3 ) + f ( m ) + k f ( m ) = ( 2 k + 3 ) f ( m ) + ( k + 1 ) f ( m ) = ( 3 k + 4 ) f ( m )
P ( m 2 , m 2 ) ⟹ f ( m 4 ) = f ( m 2 ) + f ( m 2 ) + k f ( m 2 ) = ( k + 2 ) f ( m 2 ) = ( k + 2 ) ( k + 2 ) f ( m )
So ( 3 k + 4 ) f ( m ) = ( k + 2 ) ( k + 2 ) f ( m ) for all m . Taking m = 1 3 5 , we have:
( 3 k + 4 ) ( 3 ) = ( k + 2 ) ( k + 2 ) ( 3 )
3 k + 4 = k 2 + 4 k + 4
0 = k 2 + k = k ( k + 1 )
So k = 0 or k = − 1 . For the latter case, we already have a solution given in Case 1.
For the former, take the function f ( 3 a b ) = a for all nonnegative integer a and positive integer b not divisible 3 . Since P ( m , n ) reduces to f ( m n ) = f ( m ) + f ( n ) , we only have to prove our function above satisfies P . But this is immediate:
Let m = 3 a c , n = 3 b d , where a , b are nonnegative integers and c , d are positive integers not divisible by 3 . Then,
f ( m n ) = f ( 3 a + b c d ) = a + b since c d doesn't have any factor of 3 .
f ( m ) + f ( n ) = f ( 3 a c ) + f ( 3 b d ) = a + b by definition.
So f ( m n ) = f ( m ) + f ( n ) , and so P is satisfied by our function.
Finally, as 1 3 5 = 3 3 ⋅ 5 , we have f ( 1 3 5 ) = f ( 3 3 ⋅ 5 ) = 3 , satisfying the condition. So this is a function we seek, and so k = 0 gives a solution.
So the number of k that gives at least one solution is 2 .
Case 1: k=-1 Define f(x) as 1+ the number of DISTINCT prime factors of x that are less than x If x=1 or is prime, then f(x)=1. Note that f(135)=3 because 135=3^3*5. To address f(mn)=f(m)+f(n)-f(gcd(m,n): Let A be the set of distinct prime factors of m and B be the set of distinct prime factors of n. The set of distinct prime factors of gcd(m,n) is the set (A intersect B). The set of distinct prime factors of mn is (A union B). We know from set theory that |(A union B)| =|A|+|B|-|(A intersect B)|. Thus, 1+|(A union B)| =(1+|A|)+(1+|B|)-(1+|(A intersect B)|). 1+|(A union B)| = f(mn), 1+|A| = f(m), 1+|B| = f(n), and 1+|(A intersect B)| = f(gcd(m,n)). Substituting then yields the desired result.
Case 2: k=0 Define f(x) as the number of 3's in the prime factorization of x. (3 (the number of 5's in the prime factorization of x) would also work. 135=3^3 5, so f(135)=3. The number of 3's in the prime factorization of mn is obviously equal to the number of 3's in the prime factorization of m + the number of 3's in the prime factorization of n. Thus f(mn)=f(m)+f(n)
We have now shown that k=-1 and k=0 work. Next is to show that no other value of k works. First note that f(n^s)=(s+(s-1)k) f(n) for integer s>0. Proof by induction: for s=1, f(n^1)=f(n). Assume f(n^t)=(t+(t-1)k) f(n). f(n^(t+1))=f(n^t)+f(n)+k f(gcd(n,n^t)). gcd(n,n^t)=n. thus f(n^(t+1))=(1+k) f(n)+f(n^t). Substitute (t+(t-1)k) f(n) for f(n^t): f(n^(t+1))=(1+k+t+(t-1)k) f(n)=((t+1)+t k) f(n)
Also note that unless k=-1, f(1) must be 0. Proof: x=1 x. Thus f(x)=f(1)+f(x)+k f(gcd(1,x)). gcd(1,x)=1. f(x)=(1+k) f(1)+f(x). (1+k) f(1)=0. Thus either k=-1 or f(1)=0.
Finally, consider the following: f(125 135)=f(25)+f(135 5)+k f(25)=(1+k) f(25)+f(135 5)=(1+k)(2+k)f(5)+(1+k)f(5)+f(135)=(k^2+4k+3) f(5)+3
Alternatively: f(125 135)=f(5^3)+f(135)+k f(gcd(125,135))=(3+2k) f(5)+3+k f(5)=(3+3k)*f(5)+3
Setting the two equal to each other: (k^2+4k+3) f(5)+3=(3+3k) f(5)+3 (k^2+k) f(5)=0 k (k+1)*f(5)=0 Thus k=0 or k=-1 OR f(5)=0
Now consider f(9 135) f(9 135)=f(9)+f(135)+k f(gcd(9,135))=(1+k) f(9)+f(135)=(1+k) (2+k) f(3)+3=(k^2+3k+2)*f(3)+3
Alternatively: f(9 135)=f(3^5)+f(5)+k f(gcd(5,3^5))=(5+4k)*f(3)+f(5)+f(1) We know that f(1)=0 unless k=-1 and we've already handles the case of k=-1, so assume k is not -1. Then f(1)=0
Setting both cases equal: (k^2+3k+2) f(3)+3=(5+4k) f(3)+f(5) add f(27)=(3+2k) f(3) to both sides. (k^2+5k+5) f(3)+3=(5+4k) f(3)+f(5)+f(27) substitute 3=f(135)=f(5)+f(27) (k^2+5k+5) f(3)+3=(5+4k) f(3)+3 (k^2+k) f(3)=0 thus k=0 or k=-1 OR f(3)=0
Now we have that k=0 or k=-1 or (f(3)=f(5)=0)
Last step, I promise! Assume k is neither -1 nor 0. Then f(1)=f(3)=f(5)=0 f(135)=f(27)+f(5)+f(1)=(3+2k)*f(3)+f(5)+f(1) f(1),f(3), and f(5) are all 0 Thus f(135)=0, but f(135)=3; a contradiction. Therefore the assumption is false and k must be either 0 or -1.
Sorry it was so long, just wanted to be thorough.
Note that 1 3 5 = 3 × 4 5 = 9 × 1 5 = 2 7 × 5 = 1 3 5 × 1 , and g cd ( 3 , 4 5 ) = g cd ( 9 , 1 5 ) = 3 , g cd ( 2 7 , 5 ) g c d ( 1 3 5 , 1 ) = 1
We have
3 = f ( 1 3 5 ) = f ( 3 ) + f ( 4 5 ) + k ⋅ f ( 3 )
3 = f ( 1 3 5 ) = f ( 9 ) + f ( 1 5 ) + k ⋅ f ( 3 )
3 = f ( 1 3 5 ) = f ( 2 7 ) + f ( 5 ) + k ⋅ f ( 1 )
3 = f ( 1 3 5 ) = f ( 1 3 5 ) + f ( 1 ) + k ⋅ f ( 1 )
Denote integers a , b , c , d , e , f , g as the values of f ( 1 ) , f ( 3 ) , f ( 5 ) , f ( 9 ) , f ( 1 5 ) , f ( 2 7 ) , f ( 4 5 ) respectively, then combining the first three equations,
3 = b + g + b k = d + e + b k = f + c + a k
And solve the fourth equation gives a = 0 and/or k = − 1
⇒ b + g = d + e ( ∗ )
Similarly, let m = 3 , n = 1
f ( 9 ) = f ( 3 ) + f ( 3 ) + k ⋅ f ( 3 )
⇒ d = b ( 2 + k ) ( ∗ ∗ )
And let m = 1 5 , n = 3
f ( 4 5 ) = f ( 1 5 ) + f ( 3 ) + k ⋅ f ( 3 )
⇒ g = b ( k + 1 ) + e ( ∗ ∗ ∗ )
Substitute ( ∗ ∗ ) and ( ∗ ∗ ∗ ) into ( ∗ ) :
b + b ( k + 1 ) + e = 2 ( b + k ) + e ⇒ b k = 2 k ⇒ k = 0 and/or b = 2
So the possible values of k are k = 0 , − 1 . Answer is 2
How do you know that both values of k actually work? It is not obvious that one can extend the function f to all positive integers.
Log in to reply
I've shown that k = 0 is a solution. And if k = − 1 , from ( ∗ ∗ ) , we get d = b , and from ( ∗ ∗ ∗ ) , we get g = e , which agrees with ( ∗ ) . Did I commit a fallacy somewhere?
Log in to reply
You have shown that if f is a function with this property, then k = 0 , − 1 , since no other value of k is consistent with the equations as they apply to the values of f ( 1 ) , f ( 3 ) , f ( 5 ) , f ( 9 ) , f ( 1 5 ) , f ( 2 7 ) , f ( 4 5 ) , f ( 1 3 5 ) .
What you haven't done is show that, for either k = 0 or k = − 1 , there is a function f , defined for all integers, which satisfies the conditions. In other words, you have shown that k = 0 , − 1 is a necessary condition for the existence of f , but you have not shown that it is a sufficient one.
Problem Loading...
Note Loading...
Set Loading...
Putting n = 1 we have f ( m ) = f ( m ) + f ( 1 ) + k f ( 1 ) , and hence ( k + 1 ) f ( 1 ) = 0 . There are two cases to consider:
If k = − 1 , note that, for any prime p , f ( p a ) = f ( p a − 1 ) + f ( p ) − f ( p ) = f ( p a − 1 ) a ≥ 2 Thus we deduce that f ( p a ) = f ( p ) for any prime p and any a ≥ 1 . Since f ( m n ) = f ( m ) + f ( n ) − f ( 1 ) ( m , n ) = 1 we deduce that f ( p 1 a 1 p 2 a 2 ⋯ p N a N ) = f ( p 1 ) + ⋯ + f ( p N ) − ( N − 1 ) f ( 1 ) for distinct primes p 1 , p 2 , … , p N and a 1 , a 2 , … , a N ≥ 1 . It is easy to check that this formula provides an acceptable definition of a function f with the required property for any choice of integers f ( 1 ) and f ( p ) for each prime p . There is no problem choosing f ( 3 ) , f ( 5 ) , f ( 1 ) so that f ( 1 3 5 ) = f ( 3 3 5 ) = f ( 3 ) + f ( 5 ) − f ( 1 ) = 3 , and so k = − 1 is a possible solution. A concrete example of f in this case would have f ( p ) = 2 for all primes p , and f ( 1 ) = 1 . In this case f ( n ) = N n + 1 , where N n is the number of distinct prime factors in n .
If k = − 1 then f ( 1 ) = 0 , and hence f ( m n ) = f ( m ) + f ( n ) whenever ( m , n ) = 1 , so that f is multiplicative. Since f ( p a ) = f ( p a − 1 ) + f ( p ) + k f ( p ) = f ( p a − 1 ) + ( k + 1 ) f ( p ) whenever a ≥ 2 and p ≥ 1 we deduce that f ( p a ) = [ ( a − 1 ) ( k + 1 ) + 1 ] f ( p ) = [ a ( k + 1 ) − k ] f ( p ) whenever a ≥ 1 and p ≥ 1 . But then f ( p 4 ) ( 3 k + 4 ) f ( p ) ( k 2 + k ) f ( p ) = = = f ( p 2 ) + f ( p 2 ) + k f ( p 2 ) = ( k + 2 ) f ( p 2 ) ( k + 2 ) 2 f ( p ) 0 for any p ≥ 1 . If k = 0 then f ( p ) = 0 for all p ≥ 1 , and so f ( 1 3 5 ) = 3 . Hence we deduce that k = 0 , and hence that f ( p a ) = a f ( p ) a ≥ 1 , p prime but then f ( p 1 a 1 p 2 a 2 ⋯ p N a n ) = j = 1 ∑ N a j f ( p j ) for distinct primes p 1 , p 2 , … , p N and a 1 , a 2 , … , a N ≥ 1 . Again it is easy to check that this last formula defines an acceptable function f for any choice of integers f ( p ) for any prime p . There is no problem finding integers f ( 3 ) and f ( 5 ) so that f ( 1 3 5 ) = 3 f ( 3 ) + f ( 5 ) = 3 , and hence k = 0 is the only other acceptable value of k . A concrete example of f in this case would be to have f ( 3 ) = 1 , and f ( p ) = 0 for all other primes, so that f ( n ) is the index of 3 in n .
Thus there are only two possible values of k .