= Feynman Puzzle = This is the solution to the long division puzzle on page 5 of "Perfectly Reasonable Deviations from the Beaten Path", letters of Richard Feynman collected by his daughter Michelle and published in 2005 . Here is the long division puzzle: {{{ ##A# --------- #A# ) ####A## ##AA ---- ###A ##A ----- #### #A## ----- #### #### ---- 0 }}} A can be any digit; each # can be any digit from 0 through 9 except A. There is only one solution. === How to solve it: === Use a computer as a big dumb hammer. Boring, though more difficult to program than you might imagine. === How to solve it the smart way: === Let's assign some algebraic values, b through f, to the digits in the two factors: {{{ deAf --------- bAc ) ####A## ##AA ---- ###A ##A ----- #### #A## ----- #### #### ---- 0 }}} We know quite a few things here. We know that ( d * Ac ) mod100 = AA , and that ( e * Ac ) mod 10 = A . Since d * bAc is 4 digits, and e * bAc is three digits, we know that d > e . So let's make a table of the possible A's, c's, d's, and e's (keeping in mind that c,d, and e cannot equal A. We start by looking at all the possible A's. A is mod10 of two pairs of multiplied digits ( c*d and c*e ), d>e, not containing A. {{{ A digit pairs 0 2*5 no 1 3*7 9*9 no 2 3*4 4*8 6*7 8*9 maybe (4*8 and 4*3) or (8*9 and 8*4) 3 7*9 no 4 2*2 2*7 3*8 8*8 6*9 maybe (2*7 and 2*2) or (8*8 and 8*3) 5 ( nothing, all include 5 ) no 6 2*3 2*8 4*4 4*9 7*8 maybe (2*8 and 2*3) or (4*9 and 4*4) or (8*7 and 8*2) 7 3*9 no 8 2*4 2*9 3*6 4*7 maybe (2*9 and 2*4) or (4*7 and 4*2) 9 3*3 7*7 no }}} We need two pairs of multipled digits, with one digit in common, to make c, d, and e. Here are the possibilities in tabular form: {{{ A c d e (Ac * d) mod100 =AA? ------------------------------------- 2 4 8 3 24 * 8 192 92 no 2 8 9 4 28 * 9 252 52 no 4 2 7 2 42 * 7 294 94 no 4 8 8 3 48 * 8 384 84 no 6 2 8 3 62 * 8 496 96 no 6 4 9 4 64 * 9 596 96 no 6 8 7 2 68 * 7 476 76 no 8 2 9 4 82 * 9 738 38 no 8 4 7 2 84 * 7 588 88 yes!!! }}} There is only one solution for A, c, d, and e. We have solved most of the problem! So, here is the partially solved puzzle: {{{ 728f --------- b84 ) ####8## ##88 ---- ###8 ##8 ----- ##0# #8## ----- #### #### ---- 0 }}} Now we can figure out b. We know that 8 * b84 = #8## , and since 8*84 is 672, we know that ( 8 * b ) mod 10 is (8-6)=2. Thus, b must be either 4 or 9. It cannot be 9, or d*bAc = 2*984 would be a 4 digit number, not 3 digits. So b is 4. One variable to go! We know that 728f * 484 is ####8## . 7280 * 484 is 3523520, so ( f * 484 + 520 ) = #8## . Here is a table of ( f * 484 + 520 ): {{{ f #8##? 1 * 484 + 520 = 1004 no 2 * 484 + 520 = 1488 no 3 * 484 + 520 = 1972 no 4 * 484 + 520 = 1456 no 5 * 484 + 520 = 2940 no 6 * 484 + 520 = 3424 no 7 * 484 + 520 = 3908 no 8 * 484 + 520 = 4392 no 9 * 484 + 520 = 4876 yes!! }}} so f = 9. Our two factors are '''484''' and '''7289''' . Done! Here is the long division puzzle, solved: {{{ 7289 --------- 484 ) 3527876 3388 ---- 1398 968 ----- 4307 3872 ----- 4356 4356 ---- 0 }}} Discovering this puzzle in an age before calculators is impressive. Apparently, Richard Feynman and his father traded puzzles like this all the time, so they must have spent a lot of time working on them, and they were both rapid and accurate paper and mental calculators!