Two years before he died, Lewis Carroll came up with a remarkable number-guessing game in which he’d send a volunteer through a long series of arithmetic manipulations, even allowing her to make some private decisions as to how to proceed. Along the way Carroll asked only three questions:

“Is the result odd or even?”

“Is the result odd or even?”

“How often does it go?”

And yet he would always be able to find the original number quickly. Here’s the procedure:

Think of a number (a positive integer).

Multiply by 3.

- If the result is odd, then add either 5 or 9 (whichever you like), then divide by 2, then add 1.
- If the result is even, then subtract either 2 or 6 (whichever you like), then divide by 2, then add 29 or 33 or 37 (whichever you like).

Multiply by 3.

- If the result is odd, then add either 5 or 9 (whichever you like), then divide by 2, then add 1.
- If the result is even, then subtract either 2 or 6 (whichever you like), then divide by 2, then add 29 or 33 or 37 (whichever you like).

Add 19 to original number you chose and append any digit, 0-9, to this number.

Add the previous result.

Divide by 7 and drop any remainder.

Divide by 7 again and drop any remainder, and tell me what result you get. (“How often does it go?”)

Here’s how to derive the number that was chosen originally:

Multiply the final answer by 4 and subtract 15. If the first answer was “even,” subtract 3 more, and if the second answer was “even,” subtract 2 more.

(Note: Carroll’s version contained an unfortunate flaw; the improvement given here was devised by Richard F. McCoart and includes a faster way to get the answer. See the article cited below. Carroll’s original appears in Morton N. Cohen’s *Lewis Carroll, A Biography*, 1995. Note too that the two “parity checks” above are identical, so the whole setup is easy to memorize and less bewilderingly complex than it’s intended to appear.)

(Richard F. McCoart, “Lewis Carroll’s Amazing Number-Guessing Game,” *College Mathematics Journal* 33:5 [November 2002], 378-383.)