finding number in the boxes

92 Views Asked by At

Anne writes a list of numbers with sum of digits equal to 7 only and put 7 in the first box, 16 in the second box and 25 in the third box, and so on. What is the number in the 100th box?

1

There are 1 best solutions below

0
On

We can represent a number with a digit sum of $7$ with $7$ stars and some bars.

For example $**|***|*|*$ represents the number $2311$; or conversely the number $340$ would be represented by $***|****|$.

We can represent all the numbers up to $999$ with digit sum of $7$ using $7$ stars and $2$ bars. Note: Numbers less than $100$ can be represented this way--for instance, $7$ would be represented as $| | *******$ (i.e., $007$).

There are ${9\choose 2}=36$ such configurations. So there are $36$ such numbers (the largest of which would be $700$.

Similarly up to $9999$, there would be ${10\choose 3}=120$ numbers with digit sum of $7$.

Continuing counting how many are in each thousand, in this manner, you should be able to find your answer reasonably efficiently.

So the answer (the number in the $100^\mbox{th}$ box would be somewhere between $1000$ and $9999$.

To narrow it down further, you could count how many numbers with digit sum $7$ between $1000$ and $1999$ by looking at configurations of $7$ stars and $3$ bars that start $*|$ leaving you with $6$ stars and $2$ bars to place, which can be done in ${8\choose 2}=28$ ways.

Continuing this way, you should be able to get to your answer reasonably efficiently.