Clockpunch Theorems

A good friend made a clock with a 24-hour face with hour minute and second hands all the same length and extended in both directions. He then posed a question:

Do the hands ever form a regular hexagon?

I couldn't resist the challenge. Assuming the hands ticked every second, I let t be the integer time in seconds. The hour hand takes 24 * 60 * 60 ticks to go through the full 24-hour period. So the hour hand is pointing at t `mod` (24 * 60 * 60), similarly the minute hand is pointing at (60 * t) `mod` (24 * 60) and the second hand is pointing at (24 * 60 * t) `mod` 60.

A regular hexagon has hands separated by multiples of 1/6 of a full turn, which makes (24 * 60 * 60 / 6) ticks. The hands are all offset by an arbitrary base angle, so the three hands form these equations modulo 24 * 60 * 60, with h, m, s being integers:

           t               = base + h * 24 * 60 * 60 / 6
     60 * (t `mod` (24*60) = base + m * 24 * 60 * 60 / 6
24 * 60 * (t `mod`     60) = base + s * 24 * 60 * 60 / 6

The third line implies base is a multiple of 24 * 60, which plugged into the first line means t must be a multiple of 24 * 60. This makes the left hand side of the last two lines equal to 0, so:

base = - m * 24 * 60 * 60 / 6
base = - s * 24 * 60 * 60 / 6

Equating these two makes m = s, so two hands are pointing in the same direction. This doesn't form a regular hexagon, so a regular hexagon is impossible.

My friend then posed an additional question:

What about those clocks with continuous second hands?

This means finding t such that hour hand and minute hand are a multiple of 1/6 of a full turn apart, with t fixed this constrains the second hand to a specific direction, then it remains to check if the second hand is a multiple of 1/6 turns from from the hour hand, and finally check if the configuration forms a regular hexagon.

Let t be in [0,1) for the full 24 hours. The constraint on the hour and minute hands resolves to:

fract(t + k/6) = fract(t * 24) with k = 1,2,4,5

The fractional parts of two numbers are equal when they are separated by an integer, so this simplifies to:

   t + k/6 + n = t * 24  with n an integer
-> 6 * t + (k + 6 * n) = 24 * 6 * t
-> (k + 6 * n) / (23 * 6) = t  with 0 <= n < 23

Similarly, the constraint on hour and second hands resolves to:

   fract(t + j/6) = fract(t * 24 * 60)  with j = 1,2,4,5
-> t + j/6 + m = t * 24 * 60  with m an integer
-> 6 * t + (j + 6 * m) = 24 * 60 * 6 * t
-> (j + 6 * m) / ((24 * 60 - 1) * 6) = t  with 0 <= m < 24 * 60 - 1

Equating the two expressions for t gives:

   (k + 6 * n) / (23 * 6) = (j + 6 * m) / ((24 * 60 - 1) * 6)
-> (k + 6 * n) * (24 * 60 - 1) * 6 = (j + 6 * m) * 23 * 6

Using a computer to brute force the solutions gives:

ghci> [ (k, n, j, m)
      | k <- [1,2,4,5]
      , n <- [0..22]
      , j <- [1,2,4,5]
      , m <- [0..24*60-2]
      , (k + 6 * n) * (24 * 60 - 1) * 6 == (j + 6 * m) * 23 * 6
      ]
[(1,19,1,1199),(2,15,2,959),(4,7,4,479),(5,3,5,239)]

But all of these have k = j which means the minute and second hands are pointing in the same direction. This doesn't form a regular hexagon, so a regular hexagon is impossible.