John Cake is a very indeed seriously careless person.
One day, he came up with five numbers:
( is an integer)
He chose 4 of them, and wanted to take the sum of the 4 numbers chosen, but instead, he carelessly added one of the chosen 4 numbers twice, getting 47 as the wrong sum.
If the correct sum is , what is the sum of all possible values of ?
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.
Denote A = x 2 + 1 , B = x 2 − 1 , C = 2 x , D = x 2 + 2 x , E = 3 x − 5 .
Suppose the missing number (or the not chosen number) is S M , the extra number (the number that was added twice) is S X .
Then, A + B + C + D + E = 3 x 2 + 7 x − 5 = 4 7 + S M − S X , S = 4 7 − S X .
Define n = S M − S X , then n = 3 x 2 + 7 x − 5 2 , thus we know that n must be even.
Now study the table below: A B C D E When x is odd even even even odd even When x is even odd odd even even odd
Pretty cool.
Consider all the possible values of n , there are only 14 possible values for n : ± ( A − B ) , ± ( A − C ) , ± ( A − E ) , ± ( B − C ) , ± ( B − E ) , ± ( C − D ) , ± ( C − E ) [ n cannot be ± ( A − D ) , ± ( B − D ) and ± ( D − E ) because that will definitely make n odd]
Let n = a x 2 + b x + c , then 3 x 2 + 7 x − 5 2 − n = ( 3 − a ) x 2 + ( 7 − b ) x − ( 5 2 + c ) = 0 , consider all the possible ordered triples ( a , b , c ) : n A − B B − A A − C C − A A − E E − A B − C C − B B − E E − B C − D D − C C − E E − C a 0 0 1 − 1 1 − 1 1 − 1 1 − 1 − 1 1 0 0 b 0 0 − 2 2 − 3 3 − 2 2 − 3 3 0 0 − 1 1 c 2 − 2 1 − 1 6 − 6 − 1 1 4 − 4 0 0 5 − 5 a + b + c 2 − 2 0 0 4 − 4 − 2 2 2 − 2 − 1 1 4 − 4 a − b + c 2 − 2 4 − 4 1 0 − 1 0 2 − 2 8 − 8 − 1 1 6 − 6 Wow!
See that − 1 ⩽ a ⩽ 1 , − 3 ⩽ b ⩽ 3 , − 6 ⩽ c ⩽ 6 .
From ( 3 − a ) x 2 + ( 7 − b ) x − ( 5 2 + c ) = 0 , we get − 6 ⩽ c = ( 3 − a ) x 2 + ( 7 − b ) x − 5 2 ⩽ 6 4 6 ⩽ ( 3 − a ) x 2 + ( 7 − b ) x ⩽ 5 8
Its easy to figure out that x = 0 , now let's split it into 2 cases:
If x > 0 , then 4 6 ⩽ ( 3 − a ) x 2 + ( 7 − b ) x < 4 x 2 + 1 0 x x ( 2 x + 5 ) > 2 3 ∴ x ⩾ 3 5 8 ⩾ ( 3 − a ) x 2 + ( 7 − b ) x > 2 x 2 + 4 x x ( x + 2 ) < 2 9 ∴ x ⩽ 4 ∴ 3 ⩽ x ⩽ 4
When x = 3 , − c = 9 ( a − 3 ) + 3 ( b − 7 ) + 5 2 = 9 a + 3 b + 4 ≡ a − b ( m o d 4 ) ∴ a − b + c ≡ 0 ( m o d 4 ) ( 1 ) Meanwhile, c ≡ − 1 ( m o d 3 ) ( 2 ) As we can see from the table above, when x = 3 , n satisfies ( 1 ) and ( 2 ) if n = C − A or n = E − B . In either case, they both satisfy − c = 9 a + 3 b + 4 .
∴ n = C − A , E − B ∴ S X = A , B = x 2 + 1 , x 2 − 1 = 1 0 , 8 S = 4 7 − S X = 3 7 , 3 9
When x = 4 , − c = 1 6 ( a − 3 ) + 4 ( b − 7 ) + 5 2 = 1 6 a + 4 b − 2 4 ≡ a + b ( m o d 3 ) ∴ a + b + c ≡ 0 ( m o d 3 ) ( 3 ) Meanwhile, c ≡ 0 ( m o d 4 ) ( 4 ) However, when x = 4 , from the table above, there's no such n that satisfy both ( 3 ) and ( 4 ) .
If x < 0 , then 4 6 ⩽ ( 3 − a ) x 2 + ( 7 − b ) x < 4 x 2 + 4 x 2 x ( x + 1 ) ⩾ 2 3 ∴ x ⩽ − 4 5 8 ⩾ ( 3 − a ) x 2 + ( 7 − b ) x ⩾ 2 x 2 + 1 0 x x ( x + 5 ) ⩽ 2 9 ∴ x ⩾ − 8 ∴ − 8 ⩽ x ⩽ − 4
When x = − 8 , − c = 6 4 ( a − 3 ) − 8 ( b − 7 ) + 5 2 ≡ a − 3 − b + 7 + 3 ≡ a − b ( m o d 7 ) ∴ a − b + c ≡ 0 ( m o d 7 ) ( 5 ) Obviously no such n satisfies ( 5 ) when x = − 8 .
When x = − 7 , − c = 4 9 ( a − 3 ) − 7 ( b − 7 ) + 5 2 ≡ a − 3 + b − 7 + 4 ≡ a + b + 2 ( m o d 8 ) ∴ a + b + c ≡ 6 ( m o d 8 ) ( 6 ) c ≡ 3 ( m o d 7 ) ( 7 ) No such n satisfies both ( 6 ) and ( 7 ) when x = − 7 .
When x = − 6 , − c = 3 6 ( a − 3 ) − 6 ( b − 7 ) + 5 2 ≡ a − 3 + b − 7 + 3 ≡ a + b ( m o d 7 ) ∴ a + b + c ≡ 6 ( m o d 8 ) ( 8 ) c ≡ 3 ( m o d 7 ) ( 9 ) No such n satisfies both ( 8 ) and ( 9 ) when x = − 6 .
When x = − 5 , − c = 2 5 ( a − 3 ) − 5 ( b − 7 ) + 5 2 ≡ a − 3 − b + 7 ≡ a − b ( m o d 4 ) ∴ a − b + c ≡ 0 ( m o d 4 ) ( 1 0 ) c ≡ 2 ( m o d 5 ) ( 1 1 ) No such n satisfies both ( 1 0 ) and ( 1 1 ) when x = − 5 .
When x = − 4 , − c = 1 6 ( a − 3 ) − 4 ( b − 7 ) + 5 2 = 1 6 a − 4 b + 3 2 ≡ a − 3 − b + 7 ≡ a − b ( m o d 4 ) ∴ a − b + c ≡ 0 ( m o d 4 ) ( 1 2 ) a + b + c ≡ 3 ( m o d 5 ) ( 1 3 ) When x = − 4 , if n = E − B , a = − 1 , b = 3 , c = − 4 satisfies − c = 1 6 a − 4 b + 3 2 , ( 1 2 ) and ( 1 3 ) . ∴ n = E − B ∴ S X = B = x 2 − 1 = 1 5 S = 4 7 − S X = 3 2
Therefore, the sum of all possible values of S is 3 9 + 3 7 + 3 2 = 1 0 8 .