Peter has recently been fascinated by numbers that can be expressed in the form f ( a , b , c ) = a ( b − c ) 3 + b ( c − a ) 3 + c ( a − b ) 3 for some integers a , b and c . He thinks that we should use this system to do arithmetic in future.
How many positive integers N ≤ 1 0 0 0 can be expressed in the form of f ( a , b , c ) ?
Details and assumptions
As a specific example, since f ( − 1 , 2 , 3 ) = 4 8 , hence 4 8 can be expressed in the form of f ( a , b , c ) .
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.
f(a,b,c) = (a-b)(b-c)(c-a)(a+b+c)
By pigeonhole principle, at least 2 of a,b and c have the same parity Therefore, 1 of (a-b), (b-c), (c-a) is even.
2|f(a,b,c)
If a,b,c are not pairwise congruent modulo 3, then they will be congruent to 1,2, and 0 modulo 3
3|a+b+c
If at least 2 of a,b,c are congruent modulo 3, one of (a-b), (b-c), (c-a) will be divisible by 3.
Therefore, 3|f(a,b,c) for all a,b, and c
6|f(a,b,c)
We let b=a-1, c=a+1
f(a,b,c) = -6a
As such, we can always choose a such that f(a,b,c)=6k for all k, a=-k
Therefore all and only all the multiples of 6 can be expressed in the form of f(a,b,c), which is 166 of them.
We can factor f ( a , b , c ) = ( a − b ) ( b − c ) ( c − a ) ( a + b + c ) . Suppose N = f ( a , b , c ) = ( a − b ) ( b − c ) ( c − a ) ( a + b + c ) for some integers a , b , c .
Since there are only two distinct residues m o d 2 , two of a , b , c must be congruent m o d 2 , and thus, N ≡ 0 ( m o d 2 ) .
If any two of a , b , c are congruent m o d 3 , then N ≡ 0 ( m o d 3 ) . Else, a , b , c are all distinct m o d 3 . Then, since there are only three distinct residues m o d 3 , we have a + b + c ≡ 0 + 1 + 2 ≡ 3 ≡ 0 ( m o d 2 ) , and thus, N ≡ 0 ( m o d 3 ) . So, in any case N ≡ 0 ( m o d 3 ) .
Since N ≡ 0 ( m o d 2 ) and N ≡ 0 ( m o d 3 ) , we have N ≡ 0 ( m o d 6 ) . Thus, any integer not divisible by 6 cannot be expressed in the form f ( a , b , c ) .
Finally, note that f ( n − 1 , n , n + 1 ) = − 1 ⋅ − 1 ⋅ 2 ⋅ 3 n = 6 n for any integer n . Hence any integer that is a multiple of 6 can be expressed in the form f ( a , b , c ) .
Thus, the answer is precisely the number of positive integers N ≤ 1 0 0 0 that are multiples of 6 which is ⌊ 6 1 0 0 0 ⌋ = 1 6 6 .
One might notice that if we substitute a-1 for b and a+1 for c, we get f(a,a-1,a+1) = -6a. Consequently, all multiples of 6 are in the range of f.
Now we will try to prove that only multiples of 6 can be expressed in the form of f(a,b,c). Let b=a+m, c=a+n. Then f(a,b,c) = f(a, a+m, a+n) = a(m-n)^3 + (a+m)n^3 + (a-n)(-m)^3 = 3amn^3 - 3am^3n + mn^3 - m^3n = mn(n-m)(3a+m+n) for some integers a, m, n.
First we’ll show that this product is divisible by 2. Assume for contradiction that it is possible for m, n, and n-m all to be odd. However, if m and n are odd, then n-m will be even. Therefore at least one of m, n, and n-m will be even, making f(a,b,c) strictly even.
Next we’ll show that f(a,b,c) is divisible by 3. Again, assume for contradiction that 3 does not divide m, n, n-m, or 3a+m+n. The first two conditions require that neither m nor n is congruent to 0 (mod 3), and the third requires that m and n are different residues (mod 3). Then either m is congruent to 1 and n is congruent to 2 or m is congruent to 2 and n is congruent to 1. Either way 3a+m+n is congruent to 0. Therefore f(a,b,c) is always divisible by 3.
If f(a,b,c) is always divisible by 2 and 3, then f(a,b,c) can only be a multiple of 6. And we already have that any multiple of 6 can be expressed in the form of f(a,b,c). Therefore the range of f(a,b,c) is the multiples of 6. And there are floor(1000/6) = 166 positive integer multiples of 6 less than or equal to 1000, which gives us the answer.
By noticing the cases of odd and even values of a , b , and c , we can easily get f ( a , b , c ) ≡ 0 ( m o d 2 ) . Now we will also prove that 3 ∣ f ( a , b , c ) . Suppose that b − c = x and c − a = y , thus we get a − b = − ( x + y ) ⟹ b = a + x + y , c = a + y where x , y ∈ Z . So we can rewrite the equation by f ( a , b , c ) = a ( x 3 ) + ( a + x + y ) ( y 3 ) − ( a + y ) ( ( x + y ) 3 ) ⟺ f ( a , b , c ) = − ( 3 a x 2 y + 3 a x y 2 + x 3 y + 3 x 2 y 2 + 2 x y 3 ) ⟺ f ( a , b , c ) = − ( x y ( x + y ) ( 3 a + x + 2 y ) ) . By noticing a , b , c ≡ 0 , 1 , 2 ( m o d 3 ) we can easily get f ( a , b , c ) ≡ 0 ( m o d 3 ) . Thus 6 ∣ f ( a , b , c ) . Claim: f ( a , b , c ) = 6 k ∀ k ∈ Z . Proof: Construct x = y = 1 . From the last equation, we get f ( a , b , c ) = 6 ( a + 1 ) . Because a ∈ Z , so the claim occurs. So, the number of positive integers N ≤ 1 0 0 0 that can be expressed in the form of f ( a , b , c ) are ⌊ 6 1 0 0 0 ⌋ = 1 6 6
After expansion and factorization, we get f(a,b,c)=(a-b)(b-c)(c-a)(a+b+c). Insert a=b+1, b=c+1. We can easily find out that we can make every integer divided by 6 as f(a,b,c). Then Let us prove f(a,b,c) is divided by 6. Substitute a-b = x, b-c= y, c-a= z . Then f(a,b,c)=xyz(a+b+c). First, x+y+z=0. So at least one of x, y, z is even(because it is not possible the all of them are odd). So it is enough to show f(a,b,c) is divided by 3. Let's prove this by contradiction. Assume none of x, y, z is divided by 3. Because x+y+z=0, x , y, z is congruent in modular 3. By substitution, a+b is congruent to 2b, and a+b+c is congruent to 3b, which is divided by 3. This is what we wanted to show.
Let b-c=x and c-a=y then, a(b-c)^3 + b(c-a)^3+ c(a-b)^3 = (c-y) x^3 + (x+c) y^3 + c {-(x+y)}^3 = (c-y)x^3 + (x+c)y^3 - c(x+y)^3 =cx^3 -yx^3 + xy^3 +cy^3 -cx^3 -3cx^2y - 3cxy^2-cy^3 = -yx^3+xy^3-3cx^2y-3cxy^2 =xy{ -x^2 + y^2 -3cx -3cy} =xy{ (-x+y)(x+y) -3c(x+y)} =xy(x+y)(y-x-3c) Now, since a,b,c is any integer x,y,c is can also be any integer Now, when x=y then, xy(x+y)(y-x-3c) = -6cy^3 and when y=1 , -6cy^3=-6c So, all multiples of 6 can be expressed in the given form.
when x<>y<>0 then, at least one of the number from x,y and (x+y) is divisible by 2 Also, at least one of the number is divisible by 3 Thus, for any value of x,y and c except x=y=0 , xy(x+y)(y-x-3c) is a multiple of 6 And all multiple of 6 can be expressed as xy(x+y)(y-x-3c).... Thus, all the multiples of 6 from 0 to 1000 can also be expressed in the given form. which is floor function [1000/6] = 166 Thus, there are 166 positive integers less than N that can be expressed in the given form.
Note that permuting any two of the numbers a , b , c changes the sign of the polynomial a ( b − c ) 3 + b ( c − a ) 3 + c ( a − b ) 3 . In particular, if a = b , then this expression is zero. This suggests that this polynomial is divisible by a − b and, similarly, a − c and b − c . Indeed, the following beautiful identity is true: a ( b − c ) 3 + b ( c − a ) 3 + c ( b − a ) 3 = ( a − b ) ( b − c ) ( c − a ) ( a + b + c )
Choosing a = b − 1 and c = b + 1 , we get ( − 1 ) ⋅ ( − 1 ) ⋅ ( 2 ) ⋅ ( 3 b ) = 6 b . Varying b , we can obtain all numbers divisible by 6 .
On the other hand, ( a − b ) ( b − c ) ( c − a ) is always even because at least two of the numbers a , b , c have the same parity. Also, either ( a − b ) ( b − c ) ( c − a ) is divisible by 3 or the numbers a , b , c have all different residues modulo 3 , in which case a + b + c ≡ 0 + 1 + 2 ≡ 0 ( m o d 3 ) . So in all cases ( a − b ) ( b − c ) ( c − a ) ( a + b + c ) is divisible by 6 . There are 1 6 6 numbers from 1 to 1 0 0 0 divisible by 6 .
Problem Loading...
Note Loading...
Set Loading...
I claim that a number can be expressed in the form f ( a , b , c ) iff it is divisible by 6. First we factor f ( a , b , c ) to get ( a − b ) ( b − c ) ( c − a ) ( a + b + c ) . Now, since there are three values, by the pigeonhole principle two of the three values a, b, and c must have the same value modulo 2. WLOG Let a and b be equivalent mod 2. But in this case, a − b ≡ 0 ( m o d 2 ) , so f ( a , b , c ) ≡ 0 ( m o d 2 ) and f ( a , b , c ) is divisible by 2. Similarly, mod 3 we have either (a) two of the values are equivalent, so f ( a , b , c ) ≡ 0 ( m o d 3 ) , or (b) one value is equivalent to 0 mod 3, one is equivalent to 1, and one is equivalent to 2, so a + b + c ≡ 0 + 1 + 2 ≡ 3 ≡ 0 ( m o d 3 ) and f ( a , b , c ) ≡ 0 ( m o d 3 ) . In either case, f ( a , b , c ) ≡ 0 ( m o d 3 ) , so f ( a , b , c ) is divisible by 3. Combining these two facts, we see that f ( a , b , c ) is divisible by 6. We are halfway done with our proof. Now, consider f ( x − 1 , x , x + 1 ) . Plugging this in to our factored form, we get f ( x − 1 , x , x + 1 ) = − 1 ∗ − 1 ∗ 2 ∗ ( x − 1 + x + x + 1 ) = 2 ( 3 x ) = 6 x , so for every multiple of 6, we can find values of a , b , and c for which f ( a , b , c ) is equal to that value. Our proof is now complete. From here, it is simple to see that the number of multiples of 6 less than 1000 is ⌊ 6 1 0 0 0 ⌋ = 1 6 6 .