# Antique clock problem: Solve for smallest integer $n \geq0$ in $(h+2n)\bmod {12} = (b + n) \bmod {12},$ where h, b are integers between 12 and 1.

I am not familiar with solving equations of this type. As a background it is actually related to an antique clock in my house that sometimes gets the number of chimes out of synchronization with the position of the hour hand. When this happens one fixes it by advancing the hour in such a way that the number of chimes advances by 1 for each advance of the hour hand by 2. So if h is the position of the hour hand, b the number of chimes (I call them bongs hence the b), and one starts with $h \neq b,$ the equation I worked out to get $h = b$ again is $$(h + 2n)\ mod \ 12 = (b + n) \ mod \ 12,$$ solving for the least integer $n \geq 0,$ (the number of times the hour must advance to reset the clock to $h = b$) and with h and b integers between 1 and 12 inclusive. It doesn't matter if the actual time does not match h and b once they are made equal because once that configuration is achieved the hour can also be advanced synchronously with b until reaching the current time. Minutes also not an issue. So for example if $(h,b) = (6,1)$ to start the sequence of moves is $$(8,2),(10,3),(12,4),(2,5),(4,6),(6,7),(8,8).$$ I don't really even know how to get started solving this algebraically so thanks in advance!

## 1 Answer

Well, this was a decidedly low activity question, so I looked up some basic info on modular arithmetic and realized that the solution is the smallest $n$ such that $$12 | h - b + n.$$

For example if the hour hand points to six and the number of bongs is two, n = 8 corresponding to positions of $$(8,3), (10,4), (12,5), (2,6), (4,7), (6,8), (8,9), (10,10),$$ or in the example given in the problem statement $n = 7$ since $h - b = 5,$ which corresponds to the sequence shown.

One last example, $h = 2,\ b = 5,\ h - b = -3$ gives $n = 3$ which corresponds to $$(4,6), (6,7), (8,8).$$