4
$\begingroup$

Freddy removes four consecutive even numbers from the set $\{1,2,3,\ldots,n\}$. Freddy then computes $51.5625$ as the average of the remaining $n-4$ numbers.

Which four even numbers did Freddy remove?

$\endgroup$

4 Answers 4

10
$\begingroup$

Note: 51.5625 = 825/16
To calculate the sum for a given $n$ we can do $\frac{n \cdot (n+1)}{2}$.
Then we need to have that $\frac{n \cdot (n+1)}{2} - \frac{825 \cdot (n - 4)}{16}$ is a number that can be expressed as four even consecutive numbers.

Let $x$ be the lowest of the four consecutive numbers.

The four even consecutive numbers are of the form $x+x+2+x+4+x+6= 4x + 12$.
This means that

$$\frac{\frac{n \cdot (n+1)}{2} - \frac{825 \cdot (n - 4)}{16}-12}{4}$$ must be an positive even integer and is equal to $x$

We can find then that $n=100$ is the first solution giving the result 22. But we also find out that there are an unlimited number of solutions which are all of the form $n = 100 + 128k$ for any positive integer $k$. The first couple of solutions are for example:

n x
100 22
228 3636
356 11356
484 23152

EDIT: As Tim Couwelier pointed out, the four consecutive numbers of course cannot exceed $n$, therefore the solution with $n=100$ is the only solution

$\endgroup$
2
  • 1
    $\begingroup$ Disagree with your last bit. The numbers you remove, by definition, cannot exceed 'n', or they are not even there to begin with. This leaves 22 24 26 28 as the only valid solution, for n = 100. $\endgroup$ Feb 23, 2016 at 9:54
  • 2
    $\begingroup$ @TimCouwelier didn't think of that. of course you are right :) but at least this proves there are no other solutions $\endgroup$
    – Ivo
    Feb 23, 2016 at 9:59
6
$\begingroup$

sum of:

{1,2,3,4,...,100} 1 to 100 = 5050

we need to know avg of n-4

51.5625 x 96 = 4950

so sum of 4 numbers must be:

5050 - 4950 = 100 , n+n+2+n+4+n+6 = 100 which is n = 22

numbers to be removed are :

22,24,26,28

$\endgroup$
2
  • 1
    $\begingroup$ It would be helpful to include how you got to 'n = 100'... $\endgroup$ Feb 23, 2016 at 10:13
  • $\begingroup$ Tbh, 1st try success. But I decided to try 100 since we will remove numbers, and our average is 51.256 so began with something close to middle simply by 100/2 = 50 :) $\endgroup$
    – canova
    Feb 23, 2016 at 13:01
4
$\begingroup$

22 24 26 28

Calculations:
We know the average to be 51.5625, of 825/16.

To try and end up with that fraction, we need to see where the sum of the first n integers is high enough to create a possible solution.

For n = 20, sum is only 210, so no chance of approaching 825/16
For n = 36, sum is 666, so no chance of approaching 1650/32.
For n = 52, sum is 1378, so no chance of approaching 2475/48
For n = 68, sum is 2346, so no chance of approaching 3300/64
For n = 84, sum is 3570. so no chance of approaching 4125/80
For n = 100, sum is 5050. We are looking for 4950/96, so this could have a possible solution.

Given we have a total sum of 5050 over de first 100 integers, and we only need 4950 from 96 numbers, we need to find which four consecutive integers add up to 100. Knowing the average is 25, it's fairly trivial to find 22 24 26 28 as the series to be removed.

$\endgroup$
3
$\begingroup$

N=100 and terms are: 22,24,26,28.

As we know that $ \sum_{i=1}^n i $ $=$ $ \frac{n*(n+1)}{2} $
Thus, average $\mu_1$ = $ \frac{(n+1)}{2} $

Given, four consecutive even numbers are removed. So, let the first number of the series be $x$, thus the next three are: $ x+2, x+4, x+6$.
Their sum is: $4(x+3)$.

As we can see that, the new SUM of $n-4$ terms is :

$\frac{n*(n+1)}{2}-4(x+3)$

which is :

$\frac{n*(n+1)-8(x+3)}{2}$

Also, the new mean/average of remaining terms is $51.5625$ or $\frac{825}{16}$. And the $\mu_2$ of $n-4$ terms :

$\frac{n*(n+1)-8(x+3)}{2(n+4)}$

Thus, :

$\frac{n*(n+1)-8(x+3)}{2(n+4)} = \frac{825}{16}$

or

$ 8*( n(n+1) - 8(x+3) ) = 825(n-4)$

An equation of two variable, which must have integral solution for $n \gt 4 $ and $x \gt 2 $.

I solved it using this (inefficient w.r.t Time complexity) code.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.