**WINNERS:**
Zion was the only one with the correct answer.

**ANSWERS:**
Cog A has 28 teeth; Cog B has 36 teeth; Cog C has 8 teeth.

**SOLUTION:**
As promised, an elegant solution to the puzzle.

1. Suppose the teeth counts are a, b and c. We know that b=a+c.

So the tooth ratios are a : (a+c) : c

2. Now work out the turning ratios:

If cog A does 1 revolution, cog B does a/b revolutions = a/(a+c) revolutions. Meanwhile cog C does a/c revolutions.

So the turning ratios are 1 : a/(a+c) : a/c

Now let us suppose that a,b,c are triply coprime. If we multiply the number of teeth on each cog by some positive integer k, that will not affect the mechanics since the turning ratios will remain the same. (eg, a/c = ka/kc)

What this condition ensures is that there is no smaller set of cogs which solves the problem.

I will continue to count the teeth as a,b,c, although a,b,c are now triply coprime. I allow myself to scale a solution up by some positive integer k, without loss of generality.

3. Scale up the turning ratios by (a+c).c to eliminate the denominators in the turning ratios.

c.(a+c) : a.c : a.(a+c)

Of course, the cogs can do any multiple of these turnings and end up back in their original configuration. But it is implied in the question, that these are the least such numbers, so the numbers of turnings must have no common factor (otherwise we could divide by that factor and find a solution with less turnings).

So let m be the highest common factor of these three numbers:

m=hcf{ a.(a+c), a.c, c.(a+c) }.

Since we assumed that a,(a+c),c are triply coprime, it clearly follows that m must be equal to unity.

Now let's move from ratios to actual numbers of turnings.

So,

the number of turns made by cog A is c.(a+c)

the number of turns made by cog B is a.c

the number of turns made by cog C is a.(a+c)

We have now ensured that this will create a solution with a minimal number of turnings as long as a,(a+c),c are triply coprime.

4. We are told that cog C rotates 45 times more than cog A.

So c.(a+c) + 45 = a.(a+c)

Rearranging gives:

(a+c).(a-c) = 45

If we know what (a+c) and (a-c) are, then we can work out what a and c are. Basic simultaneous equations there. a = [(a+c) + (a-c)] / 2 and c = [(a+c) - (a-c)] / 2

5. The prime factorisation of 45 is 3*3*5.

Consider how these factors are shared between (a-c) and (a+c), and what that means for a and c.

There are only three ways of doing this:

(a+c)*(a-c) ... a , c ... b=a+c

45 * 1 ... a=23, c=22 ... b=45

15 * 3 ... a=9, c=6 ... b=15

9 * 5 ... a=7, c=2, ... b=9

45*1 -- The first of these gives too big result for b. Since b can be no bigger than 40. We can only scale up by k, not down, so this is no good. Were it not for that limiting condition this would have been a valid solution.

15*3 -- In the second case, a,b,c are not coprime, but have a common factor of 3. We are relying on them being coprime. So this is no good. [This means that as C makes 45 turns more than cog A, the starting configuration will be met thrice, not once.]

9*5 -- In the third case, the figures are coprime, however, the figures are too small for the bounds. We can scale up as provision was given to do this. Cog C is the smallest and needs to be at least 4 times bigger to give the minimum 8 teeth.

Scaling up by 4 gives a=28, b=36, c=8. This is now a valid solution.

Are there other solutions? Scaling up by 5 or more would give b at least 45. This is too big, so there are no other solutions.

Q.E.D.