# Swapping hands in a generalized clock

Consider a generalized clock, where the minute hand goes n times as fast as the hour hand, where n is a positive integer. The standard clock has n=12 (sometimes n=24).

As which times can swapping the hour and minute hands result in a legal time?

In particular, for each hour h from 1 to n, for which minutes does this happen?

This obviously happens when the hands point in the same or opposite directions.

Are there any other times?

Let the hour hand be pointing at an exact value $H \in [0,1]$ ($0$ represents "12 o'clock" or the angle zero. $.5$ represents "6 o'clock" or the angle 180 or $\pi$ and $1$ represents 360, "12 o'clock" or $2\pi$ or "full circle"). Then the minute hand must be pointing at a precise value $M = \{nH\}$. i.e. the fractional part of $nH$ that is $nH = \lfloor nH\rfloor + \{ nH\}$ where $\lfloor nH\rfloor\in \mathbb Z$ ad $0 \le \{nH\} < 1$.

That's what a legitimate time is: if $M = \{nH\}$ the time is legitimate.

So we need times where $M = \{nH\}$ and $H = \{nM\}$ or $H = \{n\{nH\}\}$

$\{nH\} = nH - \lfloor nH\rfloor$; $n\{nH\} = n^2H - n\lfloor nH\rfloor=\{n^2H\} + \lfloor n^2H\rfloor- n\lfloor nH\rfloor$. $0 \le \{n^2H\} < 1$ and $\lfloor n^2H\rfloor- n\lfloor nH\rfloor\in \mathbb Z$.

So $\{n\{nH\}\} = \{n^2H\}$.

If $H = \{n^2H\}$ then $H = n^2H - k; H = \frac {k}{n^2-1} \in \mathbb Q$.

And, that's that. If $H = \frac {k}{n^2 - 1}$ then $H$ is a "reversible time".

Example: for the 12 hour clock, there are $143$ of these times. (Which actually surprises me as I assumed there were only 11.)