Peter's arithmetic

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 f(a, b, c) = a(b-c)^3+b(c-a)^3+c(a-b)^3 for some integers a , b a,b and c c . He thinks that we should use this system to do arithmetic in future.

How many positive integers N 1000 N \leq 1000 can be expressed in the form of f ( a , b , c ) f(a, b, c) ?

Details and assumptions

As a specific example, since f ( 1 , 2 , 3 ) = 48 f(-1, 2, 3) = 48 , hence 48 48 can be expressed in the form of f ( a , b , c ) f(a, b, c) .


The answer is 166.

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

Brian Reinhart
May 20, 2014

I claim that a number can be expressed in the form f ( a , b , c ) f(a,b,c) iff it is divisible by 6. First we factor f ( a , b , c ) f(a,b,c) to get ( a b ) ( b c ) ( c a ) ( a + b + c ) (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 ) a-b \equiv 0 \pmod{2} , so f ( a , b , c ) 0 ( m o d 2 ) f(a,b,c) \equiv 0 \pmod{2} and f ( a , b , c ) 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 ) f(a,b,c) \equiv 0 \pmod{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 ) a+b+c \equiv 0+1+2 \equiv 3 \equiv 0 \pmod{3} and f ( a , b , c ) 0 ( m o d 3 ) f(a,b,c) \equiv 0 \pmod{3} . In either case, f ( a , b , c ) 0 ( m o d 3 ) f(a,b,c) \equiv 0 \pmod{3} , so f ( a , b , c ) f(a,b,c) is divisible by 3. Combining these two facts, we see that f ( a , b , c ) f(a,b,c) is divisible by 6. We are halfway done with our proof. Now, consider f ( x 1 , x , x + 1 ) 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 f(x-1,x,x+1)=-1*-1*2*(x-1+x+x+1)=2(3x)=6x , so for every multiple of 6, we can find values of a , b , a, b, and c c for which f ( a , b , c ) 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 1000 6 = 166 \left\lfloor \frac{1000}{6} \right\rfloor=166 .

All correct solutions followed the same ideas.

The common mistakes were:

1) not explaining well enough why f(a,b,c) must be divisible by 3

2) not explaining well enough why every number divisible by 6 can be obtained.

Calvin Lin Staff - 7 years ago

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.

Nicely done.

Calvin Lin Staff - 7 years ago
Jimmy Kariznov
May 20, 2014

We can factor f ( a , b , c ) = ( a b ) ( b c ) ( c a ) ( a + b + c ) 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 ) N = f(a,b,c) = (a-b)(b-c)(c-a)(a+b+c) for some integers a , b , c a,b,c .

Since there are only two distinct residues m o d 2 \mod{2} , two of a , b , c a,b,c must be congruent m o d 2 \mod 2 , and thus, N 0 ( m o d 2 ) N \equiv 0 \pmod{2} .

If any two of a , b , c a,b,c are congruent m o d 3 \mod 3 , then N 0 ( m o d 3 ) N \equiv 0\pmod{3} . Else, a , b , c a,b,c are all distinct m o d 3 \mod 3 . Then, since there are only three distinct residues m o d 3 \mod{3} , we have a + b + c 0 + 1 + 2 3 0 ( m o d 2 ) a+b+c \equiv 0+1+2 \equiv 3 \equiv 0 \pmod{2} , and thus, N 0 ( m o d 3 ) N \equiv 0\pmod{3} . So, in any case N 0 ( m o d 3 ) N \equiv 0\pmod{3} .

Since N 0 ( m o d 2 ) N \equiv 0 \pmod{2} and N 0 ( m o d 3 ) N \equiv 0 \pmod{3} , we have N 0 ( m o d 6 ) N \equiv 0 \pmod{6} . Thus, any integer not divisible by 6 6 cannot be expressed in the form f ( a , b , c ) f(a,b,c) .

Finally, note that f ( n 1 , n , n + 1 ) = 1 1 2 3 n = 6 n f(n-1,n,n+1) = -1 \cdot -1 \cdot 2 \cdot 3n = 6n for any integer n n . Hence any integer that is a multiple of 6 6 can be expressed in the form f ( a , b , c ) f(a,b,c) .

Thus, the answer is precisely the number of positive integers N 1000 N \le 1000 that are multiples of 6 6 which is 1000 6 = 166 \lfloor\frac{1000}{6}\rfloor = 166 .

Nicely done.

Calvin Lin Staff - 7 years ago
Matt Mistele
May 20, 2014

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.

Well written, correct solution

Calvin Lin Staff - 7 years ago
Fatik Redy Hanif
May 20, 2014

By noticing the cases of odd and even values of a , b , a,b, and c , c, we can easily get f ( a , b , c ) 0 ( m o d 2 ) . f(a,b,c) \equiv 0 \pmod{2}. Now we will also prove that 3 f ( a , b , c ) . 3|f(a,b,c). Suppose that b c = x b-c=x and c a = y , c-a=y, thus we get a b = ( x + y ) a-b=-(x+y) b = a + x + y , c = a + y \implies b=a+x+y, c=a+y where x , y Z . x,y \in 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)=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 ) \iff f(a,b,c)=-(3ax^2y+3axy^2+x^3y+3x^2y^2+2xy^3) f ( a , b , c ) = ( x y ( x + y ) ( 3 a + x + 2 y ) ) . \iff f(a,b,c)=-(xy(x+y)(3a+x+2y)). By noticing a , b , c 0 , 1 , 2 ( m o d 3 ) a,b,c \equiv 0,1,2 \pmod{3} we can easily get f ( a , b , c ) 0 ( m o d 3 ) . f(a,b,c) \equiv 0 \pmod{3}. Thus 6 f ( a , b , c ) . 6|f(a,b,c). Claim: f ( a , b , c ) = 6 k k Z . f(a,b,c)=6k \forall k \in Z. Proof: Construct x = y = 1. x=y=1. From the last equation, we get f ( a , b , c ) = 6 ( a + 1 ) . f(a,b,c)=6(a+1). Because a Z , a \in Z, so the claim occurs. So, the number of positive integers N 1000 N \leq 1000 that can be expressed in the form of f ( a , b , c ) f(a,b,c) are 1000 6 = 166 \lfloor \frac {1000}{6} \rfloor = 166

"By noticing a , b , c 0 , 1 , 2 ( m o d 3 ) a,b,c \equiv 0,1,2 \pmod{3} we can easily get f ( a , b , c ) 0 ( m o d 3 ) . f(a,b,c) \equiv 0 \pmod{3}. " It is probably implied that if two of the numbers a,b,c are congruent modulo 3, then their difference is divisible by p. Should have been more explicit.

Calvin Lin Staff - 7 years ago
Gwang Hyeon Choi
May 20, 2014

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.

" 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)." It should be a bit more specific.

Calvin Lin Staff - 7 years ago
Saurav Shakya
May 20, 2014

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.

"Also, at least one of the number is divisible by 3" Not necessarily: if x=y=1, then x,y,x+y are not multiples of 3.

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

Note that permuting any two of the numbers a , b , c a,b,c changes the sign of the polynomial a ( b c ) 3 + b ( c a ) 3 + c ( a b ) 3 . a(b-c)^3+b(c-a)^3+c(a-b)^3. In particular, if a = b a=b , then this expression is zero. This suggests that this polynomial is divisible by a b a-b and, similarly, a c a-c and b c . 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 ) 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 a=b-1 and c = b + 1 , c=b+1, we get ( 1 ) ( 1 ) ( 2 ) ( 3 b ) = 6 b . (-1)\cdot (-1) \cdot (2) \cdot (3b)=6b. Varying b , b, we can obtain all numbers divisible by 6. 6.

On the other hand, ( a b ) ( b c ) ( c a ) (a-b)(b-c)(c-a) is always even because at least two of the numbers a , b , c a,b,c have the same parity. Also, either ( a b ) ( b c ) ( c a ) (a-b)(b-c)(c-a) is divisible by 3 3 or the numbers a , b , c a,b,c have all different residues modulo 3 3 , in which case a + b + c 0 + 1 + 2 0 ( m o d 3 ) . a+b+c\equiv 0+1+2 \equiv 0\pmod 3. So in all cases ( a b ) ( b c ) ( c a ) ( a + b + c ) (a-b)(b-c)(c-a)(a+b+c) is divisible by 6 6 . There are 166 166 numbers from 1 1 to 1000 1000 divisible by 6 6 .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...