Two shafts that must be in line
Assumes The reductions a planetary cannot give and A clock is a factorisation.
An ordinary two-stage gear train has three shafts: input, layshaft, output. The ratio is the product of the two pairs and any ratio at all can be had by choosing them, subject only to keeping each pair within reason.
Now add one requirement. The input and output shafts must be in line — the same axis, one hollow through the other, or the output emerging from the far end of the case where the input went in. That is a reverted train, and it is what a clock’s motion work, a lathe’s back gear, a coaxial reduction box and the drive through many machine tool heads all are.
The requirement sounds like packaging. It is arithmetic, and it is severe.
Two equations in four integers
If the input and output shafts are coincident, the layshaft is at some distance from that axis, and both pairs of gears span that same distance. At a common module, the centre distance of a pair is half the sum of its tooth counts. So
and the ratio requirement is
Four unknowns, two equations, and both have to be satisfied in whole numbers. That is a Diophantine problem, and Diophantine problems are the ones that either have solutions or emphatically do not.
The site met this shape once before, in the timing field, where the question was which ratios can be made exactly by two pairs of cuttable wheels. Sixty had 404 answers and the sidereal ratio had none at all. Here there is one further equation, and it is worth being precise about the difference: that essay’s constraint was on the product, and this one adds a constraint on the two sums. A shaft position, expressed as arithmetic.
The enumeration
Sweep every from 14 to 120 teeth, compute from the sum condition, and keep the quadruples whose products give the target exactly. All comparisons are integer comparisons: nothing is compared as a decimal anywhere, so “exact” means exact.
| target | solutions | smallest largest-wheel | the smallest solution |
|---|---|---|---|
| 2 | 118 | 21 | 14 · 21 / 15 · 20 |
| 3 | 120 | 30 | 15 · 30 / 18 · 27 |
| 4 | 119 | 28 | 14 · 28 / 14 · 28 |
| 5 | 84 | 42 | 14 · 42 / 21 · 35 |
| 6 | 80 | 36 | 14 · 36 / 15 · 35 |
| 8 | 54 | 48 | 15 · 48 / 18 · 45 |
| 9 | 53 | 42 | 14 · 42 / 14 · 42 |
| 12 | 40 | 63 | 14 · 63 / 21 · 56 |
| 16 | 31 | 56 | 14 · 56 / 14 · 56 |
| 20 | 14 | 75 | 15 · 75 / 18 · 72 |
| 25 | 13 | 70 | 14 · 70 / 14 · 70 |
| 36 | 7 | 84 | 14 · 84 / 14 · 84 |
Read the third column down and something is wrong with the expected pattern. The largest wheel a target needs generally grows with the target — 21 teeth for 2 : 1, 84 for 36 : 1 — but not monotonically. Twelve to one needs a 63-tooth wheel, while sixteen to one manages with 56 and nine to one with 42. A ratio between two others needs a bigger gearbox than either of them.
The reason is that 12 is not a square
Look at the fourth column. Four of the twelve targets have a smallest solution with and — two identical stages — and every one of those targets is a perfect square: 4, 9, 16, 25, 36.
That is not a coincidence and it is not about squares of integers particularly. If the two stages are identical then each contributes the same ratio and the target is . So a reverted train with identical stages exists exactly when the target is the square of a rational that can be realised as a ratio of two tooth counts in range. Sixteen is and the stages can both be 14 : 56; twenty-five is and both can be 14 : 70.
Twelve is not the square of a rational. So its two stages are forced to be different, and the sum condition then has to be satisfied by two genuinely different pairs. That is a much harder demand: two distinct factorisations of one number, whose tooth counts happen to add to the same total. The smallest is against , both summing to 77, with stage ratios of 4.5 and 2.667 whose product is exactly 12.
The enumeration confirms it directly: across all targets, the number of identical-stage solutions is 47, 27, 17, 11 and 7 for the five square targets, and zero for every non-square. It is one of the cleanest structural facts in this phase and it fell out of a table that was assembled to answer a different question.
What the constraint costs
Set the sum condition aside for a moment. Without it, a twelve-to-one two-stage train is trivial: 20 : 60 and 15 : 60, done, largest wheel 60, and a hundred other answers. With it, no answer exists at all until a wheel is allowed 63 teeth.
Three teeth on the largest wheel does not sound like much. What it means physically is that the requirement to bring the output shaft back onto the input’s axis has, on its own, made the gearbox bigger — and it has done so for a reason that no drawing shows and no layout study would find, because the reason is that 12 has no two factorisations whose factor-sums agree below that size.
That is the general shape of this field’s harder results. A condition stated as a position — put the output shaft here — turns into a condition on integers, and the integers refuse.
Where the solutions sit
The count alone hides the structure, and the list is worth looking at. For twelve to one with wheels between 14 and 100 there are twenty-four, and the first six are
Two things about that list. The stage ratios are wildly uneven — 4.5 against 2.667 in the first, 6.86 against 1.75 in the second — because the sum condition rewards a large-with-small pairing on one stage and a middling one on the other. And the sums themselves are all different: 77, 110, 105, 110, 80, 88. Each solution is its own centre distance, so choosing between them is choosing the size of the gearbox as much as the wheels in it.
That is the practical shape of a Diophantine design problem. There is no continuum to slide along and no gradient to follow; there is a finite list, its members are far apart, and the choice is discrete in every variable at once.
The two escapes
Two things a designer actually does, and both are visible in the arithmetic.
Use two modules. If the two pairs are cut at different modules and , the sum condition becomes , and the second module can be chosen to make almost anything fit. This is exactly the escape the compound epicyclic uses for its half-tooth centre distance discrepancy. It costs two cutters and two sets of spares rather than one, which is a real cost in a production gearbox and no cost at all in a one-off.
Use profile shift. Move the cutter out on one pair and it will run happily at a centre distance away from its nominal, at the price of a changed operating pressure angle and changed tooth thicknesses. This is the technique the teeth field owns, and it is doing here what it does there: absorbing a discrepancy that arithmetic will not.
Both escapes have the same character. The exact ratio is preserved — it is a count and cannot be moved — and the geometry is bent to accommodate it. That asymmetry is worth naming, because it is why gear design feels the way it does: the ratios are rigid and the lengths are negotiable, which is the exact opposite of every linkage problem on this site, where the lengths are given and the motion is whatever follows.
The condition read as a lattice
There is a way of seeing why the sum condition is so restrictive that makes the arithmetic feel less arbitrary.
Fix the sum . Then each stage is a pair of positive integers adding to , and its ratio is — a function of one integer. So for a given the available stage ratios are a finite ladder of values, and the question becomes: does that ladder contain two members whose product is the target?
For and wheels at least 14, the ladder runs , , … down to : fifty values. Twelve is in the set of pairwise products exactly once, which is why is the smallest solution and why it took until to find one.
Seen that way, the difficulty is a collision problem: how likely is a particular number to be a product of two members of a short ladder of rationals? For a perfect square it is guaranteed the moment itself is in the ladder, which is why squares are easy. For anything else it is a matter of the target’s factorisations lining up with the ladder’s spacing, and the ladder’s spacing is decided by .
That also explains the non-monotonicity in the table. A larger target does not need a longer ladder; it needs a ladder containing the right pair, and whether one exists is a fact about the target’s divisors rather than about its size.
The balanced solution
Among the solutions for a target there is usually a preference: make the two stage ratios as equal as possible, so that neither wheel is much larger than the other and the layshaft sits sensibly. That is the standard rule for a two-stage train, and for a free train the answer is per stage.
For a reverted train it is not available in general, since equal stages need a square target. The enumeration’s most balanced twelve-to-one is
with stage ratios 4 and 3, both summing to 80. Against the ideal of each, the split is 15.5% high and 13.4% low, which is as close as four integers summing in pairs will get in this range.
Why the clock got a different answer
The clock-train essay asked a question of the same family and got a much more generous answer — 404 exact two-pair trains for a ratio of sixty — and the difference between the two results is worth pinning down, because it is entirely one equation.
That essay’s condition was on the product alone: find and with , with all four counts cuttable. Four unknowns, one equation, and a large solution set — the enumeration’s job was to count them rather than to find one.
This essay adds . That is a second equation on the same four unknowns, and it cuts the solution set from a three-parameter family to a one-parameter one — which is why sixty went from hundreds of answers to, in the reverted case, whatever the sums allow.
The pattern is worth carrying: each geometric requirement stated as a position becomes one Diophantine equation, and each equation costs roughly a dimension of the solution set. A ratio is one. Coaxial shafts is two. A ratio, coaxial shafts and a specified centre distance would be three, and at that point there is generally nothing at all.
The 2 : 1 that a planetary could not give
One cross-reference worth making explicit, because it closes a loop opened in the previous essay.
No single planetary gear set can give a reduction of 2, in any configuration, with any tooth counts. The reachable set has a hole from 1.630 to 2.586 and 2 is in the middle of it.
A reverted train can, easily: , largest wheel 21 teeth, exact, coaxial in and out, and one of a hundred and eighteen solutions. The two mechanisms are close cousins — both put the output back on the input’s axis, both use two meshes — and one of them can do the most ordinary reduction there is while the other cannot do it at all.
The difference is in which conditions bind. A planetary’s ring must exceed its sun by two whole planets, which forces and puts a floor of 2 under everything. A reverted train has no such relation between its wheels; its constraint is on two sums rather than on a difference of radii, and a sum can be satisfied by a large wheel with a small one as easily as by two middling ones.
Ask for a ratio, not for a number
The non-monotonicity is the most practically useful thing in this essay and it is easy to read as a curiosity. Twelve to one needing a sixty-three-tooth wheel where sixteen to one manages with fifty-six is not a fact about twelve; it is a fact about asking for twelve exactly.
A design requirement almost never is exactly twelve. It is about twelve, arrived at from a motor speed and a wanted output speed, both of which carry their own latitude. And the cost of the requirement varies wildly across that latitude — the neighbours of a hard target are frequently easy, because the difficulty is a collision property of one integer and its neighbours are different integers with no reason to behave alike.
So the useful output of this search is not a solution for the target. It is a table of nearby targets and what each one costs, in largest tooth count, and the designer picks from it. A requirement of twelve that could tolerate 11.67 or 12.25 may be met with a much smaller gearbox, and nothing in the specification as written says whether it can — which makes the latitude the single most valuable piece of information the designer holds and the one least often written down.
That reframes the whole class of problem this field keeps meeting. A Diophantine requirement is expensive when it is exact and cheap when it is nearly exact, and the difference between the two is enormous rather than marginal: exact solutions are scattered and approximate ones are dense. The designer’s real question is therefore never can this ratio be achieved but how much does the last decimal place cost.
Which is also why the two escapes work as well as they do. Two modules and profile shift are both ways of relaxing the sum condition slightly, and a slightly relaxed Diophantine condition is not a slightly easier problem — it is a qualitatively different one, because the lattice points no longer have to land exactly and the density argument changes character. Neither escape is a fudge; both are the recognition that one of the two conditions was never as hard as it was written.
The exception is the case where the exactness is genuine, and it is worth marking so the argument is not read as licence. A clock’s train must divide a day exactly, because the error accumulates and there is no latitude anywhere in the requirement. That is the situation this field’s arithmetic is really for, and it is rarer than the number of exact ratios in specifications would suggest.
So the rule is short. Find out what the latitude is before running the search, because it decides which of two very different problems is being solved — and a requirement stated as an integer with no tolerance is a requirement nobody has examined.
What the check has to be able to lose
The gate asserts three things about the search and the third is the one that would catch a broken enumeration.
That a twelve-to-one reverted train has no solution with wheels up to 60 teeth — a claim that fails if the search is over-generous. That it has solutions at 100 — a claim that fails if the search is broken rather than the ratio hard, which is the failure mode that would otherwise make the first claim look profound. And that every returned quadruple actually satisfies both equations, checked one at a time, so that a solution which met the ratio and not the centre distance would be refused rather than counted.
The last is not decorative, and the way it is written is the point. The obvious way to test the ratio is to divide — compute z2 * z4 / (z1 * z3) and compare it with the target — and a comparison of two doubles needs a tolerance, and any tolerance at all admits quadruples whose product is nearly right. “Nearly right” is not a category a gear train has: a train either delivers 12 exactly or delivers something else for ever. The test is therefore written as z2 * z4 === target * z1 * z3, an equality of integers, and the whole enumeration is a count of exact solutions rather than a count of solutions within a tolerance nobody stated.
About the same objects
Not linked from either essay — found by the objects both name.
- Which tooth meets which design rule · enumeration · gear train · velocity ratio · wheel train
- A bearing is a planetary with no teeth design rule · gear train · velocity ratio
- A ratio with no steps in it design rule · transmission relation · velocity ratio
- Four speeds from two numbers exact arithmetic · transmission relation · velocity ratio
- The gearset that could not be assembled centre distance · design rule · enumeration
- The lever that is the gearset exact arithmetic · transmission relation · velocity ratio
What links here
The 8 of 9 essays linking to this one that name the most of the same objects.
- The reductions a planetary cannot give More than one input
- A ratio is a null space More than one input
- The steps are not free More than one input
- A bounded ratio made unbounded More than one input
- The power that goes round twice More than one input
- A ratio that is a count Machines you have met
- The demand that cannot be met The shape is the unknown
- Which numbers survived Machines you have met
The objects this essay names
Each one links to every other essay that touches it.
Centre distanceDesign ruleDiophantineEnumerationExact arithmeticGear trainReverted trainTransmission relationVelocity ratioWheel train