# How solve BMO maths problem elegantly?

I am looking over some of the british mathematical olympiad questions and tried the following question:

On Thursday 1st January 2015, Anna buys one book and one shelf. For the next two years, she buys one book every day and one shelf on alternate Thursdays, so she next buys a shelf on 15th January 2015.

On how many days in the period Thursday 1st January 2015 until (and including) Saturday 31st December 2016 is it possible for Anna to put all her books on all her shelves, so that there is an equal number of books on each shelf?

I have come to the conclusion that the only time that Anna has enough books such that there are an equal number of books on each shelf, is on an odd week, except for the second week.

Since there are $104$ whole weeks, $52$ of them will be odd. Adding $1$ due to the second week working we get 53. Hence the number of days there is an equal number of books on each shelf is $53 \times 7 = 371$ days.

Is my reasoning and answer correct, or not?

• In the second half of January, 2015, she can distribute the books evenly on January 16th, 18th, 20th, etc. In the first half of February she can distribute them evenly on February 2nd, 5th, 8th, etc. I'm not sure how you reached the conclusion you did (the "odd week" conclusion). I don't think it's correct. – John Nov 3 '16 at 18:29
• I thought she bought a new book and shelf every week alternatively, not every day as the question states. Oops. – Tom Finet Nov 3 '16 at 19:07

The number of shelves must divide the number of books evenly.

The trick is that she'll always be able to distribute the books evenly the day before she buys a new shelf. Each shelf will contain $14$ books.

Knowing this, we can calculate how many other times during the fortnight ($14$-day period) it will work.

The first one it works every day ($14$ times).

The second one it works every other day ($7$ times).

The third one it works every third day, working backwards from the last day ($5$ times).

The $n$th one it works every $n$th day, working backwards from the last day. This can be expressed as $\lceil14/n\rceil$, the smallest integer greater than or equal to $14/n$.

For the first six fortnight periods, this is $14, 7, 5, 4, 3, 3$.

If $7 \leq n < 14$ it equals $2$.

If $n \geq 14$ it equals $1$.

So adding these up through $n=52$ we get $14+7+5+4+3+3+7(2)+39(1) = 89$ times.

Since the name of day (Saturday etc) and year does not matter, let's call each day simply "$k$" where $1\le k \le 731$ (since there are 731 days in 2015 and 2016). So 1st of 2015 corresponds to $1$.

Now, we can translate the condition of problem as follows:

For $k\ge 0$, during the period of $14k+1$ to $14(k+1)$ Anna will have exactly $k+1$ shelves and $14k+i$ books on day $14k+i$ for $1\le i\le 14$. The key observation is that incidentally $(k+1)$ always divde $14(k+1)$, so on each last day of a 2-week period, Anna will have equal number of books on her shelves.

One further observation: if $k\ge 13$, then $k+1\ge 14$ so $k+1$ will divde at most one of $14k+1,\cdots,14(k+1)$ but $k+1$ always divide $14(k+1)$. So $k+1$ divides none of $14k+1,\cdots,14k+13$, so in this period on only one Anna distributes her books evenly.

The rest is just computing number of days she achieves even distribution for $k\le 12$, which shouldn't be too hard.

• I don't understand how you get $k + 1$ shelves. Also nice solution, I wish I was better at problem solving. @user160738 – Tom Finet Nov 4 '16 at 19:20
• @TomFinet Well on her first day she get 1, and since she always recieve 1 more after 14 days you will have day-shelves sequence that goes like 1-1, 15-2, 29-3, 43-4, etc and notice that the sequence 1,15,29,..., are of the form $14k+1$. You will get better at problem solving as the time goes, as long as you don't give up at some point. Also I too am totally bad at it, but thanks for the compliment though :) – user160738 Nov 4 '16 at 19:27