Why three
You will learn
Why base 3 is the cheapest whole base to write numbers in, and what that argument leaves out.
Writing a number in base b takes some digits, and every digit must tell b states apart. Price a digit at b and a number costs b times its digit count. The widget runs the spec's own cost(): every number up to 999999 costs 39 in base 3 and 40 in bases 2 and 4. Over a long range the price per digit is b / ln b, smallest at e; 3 is the whole base nearest to it. The model leaves out why binary won: two-state parts are cheap, fast and robust.