 # Problem of the Week Problem E and Solution How Many?

## Problem

Natalia has a jar containing some number magnets. In the jar there is one set of numbers from $$1$$ to $$9$$, as well as some extra number $$5$$ magnets and number $$8$$ magnets. If the mean (average) of all the numbers in the jar is $$6.4$$, what is the smallest possible number of number magnets in the jar? ## Solution

Let $$m$$ be the number of extra number $$5$$ magnets and $$n$$ be the number of extra number $$8$$ magnets in the jar, where both $$m$$ and $$n$$ are positive integers.

It follows that there are a total of $$(9+m+n)$$ number magnets in the jar. The sum of the numbers in the jar is $$(1+2+3+\cdots+7+8+9+5m+8n)$$ which simplifies to $$(45+5m+8n)$$.

The mean (average) of a set of values is equal to the sum of the values in the set divided by the number of values in the set. Since the average of all the numbers in the jar is $$6.4$$, we can write the following equation. \begin{aligned} \frac{45+5m+8n}{9+m+n}&=6.4\\ \frac{450+50m+80n}{9+m+n}&=64\\ 450+50m+80n&=64(9+m+n)\\ 450+50m+80n&=576+64m+64n\\ 16n-14m&=126\\ 8n&=63+7m\\ n&=\frac{7(9+m)}{8} \end{aligned} Since $$m$$ and $$n$$ are positive integers, $$7(9+m)$$ must be divisible by $$8$$. Since $$7$$ is not a multiple of $$8$$, it follows that $$(9+m)$$ must be a multiple of $$8$$.

Since $$m$$ is a positive integer, $$(9+m)$$ must be greater than $$9$$. The smallest multiple of $$8$$ which is also greater than $$9$$ is $$16$$. Therefore, $$9+m=16$$ and $$m=7$$. Then we can solve for $$n$$. $n=\frac{7(9+m)}{8}=\frac{7(16)}{8}=14$ Therefore, the smallest number of number magnets in the jar is $$9+7+14=30$$. It is left as an exercise for the solver to verify that this produces the correct average.

Extension:

Determine the largest number of number magnets less than $$1000$$ that could be in the jar, if their mean is $$6.4$$.