Find the number between 1 and 49 (inclusive) such that the sum to the left of it is equal to the sum to the right of it.
Note:
For example, between 1 and 8, 6 would be the answer, as the sum of the numbers to the left of 6, which is
1
+
2
+
3
+
4
+
5
=
1
5
,
is equal to the sum of the numbers to the right of 6, which is
7
+
8
=
1
5
.
Bonus: Generalize it for any set of numbers from k to n with proof.
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.
I did it long hand and found that sum of 1- 19 = sum of 47-49
Can you check your working for the bonus part? Substituting in k = 1 doesn't give us x = n .
Log in to reply
Substituting in k = 1 means that we get x = the square root of ( n 2 + n + 1 − 1 ) / 2 . Or in other words, the square root of 1/2 x [ n 2 + n ] or the square root of 1/2 x n ( n + 1 ) . This means that x is equal to the root of the sum of the numbers from 1 to n, which is correct.
x shouldn't be equal to the root of n , as I have defined n as the maximum integer in the list.
This article I read on Brilliant site comes to my mind:
https://brilliant.org/problems/ramanujan-and-mahalanobis/ and this link also narrates the story
https://totient.wordpress.com/2008/05/28/ramanujans-continued-fraction/
Can anybody come up with the Continued Fraction which Ramanujam dictated to Mahalanobis while stirring the vegetables.
Problem Loading...
Note Loading...
Set Loading...
For the general problem: The sum of the integers from 1 to n is equal to 2 n ( n + 1 ) (as it is the n th triangle number). Therefore, the sum of integers from 1 to 4 9 = 2 4 9 × 5 0 = 1225. Let us remove the number x from the sum. This means that, excluding x , the sum of the numbers to the left of x is the sum of the numbers from 1 to x − 1 = 2 ( x − 1 ) ( x ) . This is equal to half of the sum of numbers from 1 to 4 9 (excluding x ). Putting this information gives us the equation which we can then simplify:
2 1 2 2 5 − x = 2 ( x − 1 ) ( x )
1 2 2 5 − x = x 2 − x
x = 1 2 2 5
x = 3 5
Therefore, the answer is 3 5 .
For the bonus problem: This time, we need the sum of integers from k to n rather than from 1 to n . This can be done by getting the sum of integers from 1 to n and subtracting from this the sum of integers from 1 to k − 1 . Therefore, the sum of integers from k to n = 2 n ( n + 1 ) − 2 ( k − 1 ) ( k ) . Let us again call the number we need to find x . This means that, excluding x , the sum of the numbers to the left of x (from k to x − 1 ) is the sum of the numbers from 1 to x − 1 minus the sum of numbers from 1 to k − 1 . This is equal to 2 ( x − 1 ) ( x ) − 2 ( k − 1 ) ( k ) . This value plus x plus this value again is equal to the sum of numbers from k to n as the totals on either side of x are equal. Therefore:
2 n ( n + 1 ) − 2 ( k − 1 ) ( k ) = 2 × [ 2 ( x − 1 ) ( x ) − 2 ( k − 1 ) ( k ) ] + x
2 n ( n + 1 ) − 2 ( k − 1 ) ( k ) = x ( x − 1 ) − k ( k − 1 ) + x
2 n ( n + 1 ) − 2 ( k − 1 ) ( k ) = x 2 − k 2 + k
n 2 + n − k 2 + k = 2 x 2 − 2 k 2 + 2 k
n 2 + n + k 2 − k = 2 x 2
x 2 = 2 n 2 + n + k 2 − k
x = the square root of: 2 n 2 + n + k 2 − k Note: x has to be positive
Of course, x has to be an integer as it is from a list of integers (as do n and k ). But this is the way to find the number chosen from a list with definitive start and end points.