How Many Times Can You Add Up the Digits?
Take a number. Add up its digits. Now add up that number’s digits. Do that two more times. Did you finally get a one-digit number?
Welcome to Fiddler on the Proof! The Fiddler is the spiritual successor to FiveThirtyEight’s The Riddler column, which ran for eight years under the stewardship of myself and Ollie Roeder.
Each week, I present mathematical puzzles intended to both challenge and delight you. Beyond these, I also hope to share occasional writings about the broader mathematical and puzzle communities.
Puzzles come out Friday mornings (8 a.m. Eastern time). Most can be solved with careful thought, pencil and paper, and the aid of a calculator. Many include “extra credit,” where the analysis gets particularly hairy or where you might turn to a computer for assistance.
I’ll also give a shoutout to 🎻 one lucky winner 🎻 of the previous week’s puzzle, chosen randomly from among those who submit their solution before 11:59 p.m. the Monday after that puzzle was released. I’ll do my best to read through all the submissions and give additional shoutouts to creative approaches or awesome visualizations, the latter of which could receive 🎬 Best Picture Awards 🎬.
This Week’s Fiddler
From Tom Rich comes a short-ish puzzle with a long-ish answer:
For any positive, base-10 integer N, define f(N) as the number of times you have to add up its digits until you get a one-digit number. For example, f(23) = 1 because 2+3 = 5, a one-digit number. Meanwhile, f(888) = 2, since 8+8+8 = 24, a two-digit number, and then adding up those digits gives you 2+4 = 6, a one-digit number.
Find the smallest whole number N such that f(N) = 4.
Extra Credit
Now that you’ve had some fun with larger numbers, let’s return to more mundane orders of magnitude.
For how many whole numbers N between 1 and 10,000 (inclusive, not that it matters) does f(N) = 3?
Making the Rounds
There’s so much more puzzling goodness out there, I’d be remiss if I didn’t share some of it here. This week, I’m sharing a puzzle from Daniel Litt I saw recently—but beware of spoilers if you click the link! For your convenience, I’m paraphrasing the puzzle here:
You are given an urn containing 100 balls. N of them are red, and 100−N are green, where N is chosen uniformly at random between 0 and 100 (inclusive). You take a random ball out of the urn—it just so happens to be red—and discard it. Is the next ball you pick, from among the 99 remaining balls, more likely to be red or green?
For many folks on social media, it appears that the correct answer disagreed with their intuition. But what I found most interesting was the fact that if you replaced “100” with any other number, whether a thousand or a million, the probability that the next ball was green remained the same!
Want to Submit a Puzzle Idea?
Then do it! Your puzzle could be the highlight of everyone’s weekend. If you have a puzzle idea, shoot me an email. I love it when ideas also come with solutions, but that’s not a requirement.
Last Week’s Fiddler
Congratulations to the (randomly selected) winner from last week: 🎻 Chris Connett 🎻 from New York, New York. I received 68 timely submissions, of which 63 were correct—good for a 93 percent solve rate!
Last week, a very tiny Alice was racing across a 2-by-2 chessboard, as shown below, where each smaller square had a side length of 1 cm. Alice started at the bottom-left corner of the bottom-left black square and was trying to reach the top-right corner of the top-right black square.
There was just one catch. Alice moved faster on the white squares than she did on the black squares. Her speed on the white squares was 1 cm per minute (again, she was very small), while her speed on the black squares was 0.9 cm per minute.
What was the least amount of time it would have taken her to reach the finish?
If Alice had walked straight across the main diagonal of the board, she would have journeyed 2√2 cm. Since the diagonal fell entirely on the black squares, her speed would have been 0.9 cm per minute the entire time. That meant it would have taken her 2√2/0.9, or approximately 3.143 minutes.
Alternatively, she could have minimized her time spent on the black squares by initially moving straight up or directly to the right. Either way, she would have reached a white square after 1 cm. From there, she could zip across the diagonal of the white square, a distance of √2 cm. Finally, she had to move a final 1 cm across the other black square. This trip would have taken her a total of √2 + 2/0.9, or roughly 3.636 minutes. Alas, that was even slower than the straight diagonal path.
As it turned out, the optimal path was somewhere between these two extremes. The fastest path across any individual black or white square was a straight line, although Alice’s path could bend or kink when she crossed between squares. Therefore, you could parameterize her path as follows: Have Alice move in a straight path up and to the right, where she then crossed over to a white square a distance a cm to the left of the board’s center. Then, have her continue in a new straight line path until she crossed back to a black square a distance b cm above the board’s center. From there, have her proceed to the finish. Now, the question was: Which values of a and b minimized Alice’s travel time?
Many solvers, including the MassMutual Fiddlers (hey, friends!) and Emily Bradon Zhang, used the symmetry of the chessboard to further simplify the problem. Since going from the start to the finish was the same as going from the finish to the start, Alice’s optimal path had to be symmetric across the diagonal from the top left of the board to the bottom right. In other words, a and b had the same value!
Now, let’s do some algebra. If we call the start (0, 0) and the finish (2, 2), then Alice’s path went through (1−a, 1) and (1, 1+a). The first leg of her journey—across the bottom-left black square—had a distance of √(1+(1−a)2) cm, and took her√(1+(1−a)2)/0.9 minutes. The second leg—across the top-left white square—had a distance of a√2 cm, and took her a√2 minutes. The final leg—across the top-right white square—took her just as long as the first leg. The duration of her journey was therefore 2√(1+(1−a)2)/0.9 + a√2 minutes.
You could minimize this function by inspecting its graph or by taking its derivative with respect to a and setting it to zero. Either way, that minimum occurred when a was 1−9/√119 (approximately 0.175), which meant the minimum time was √(238)/9 + √2, or about 3.128 minutes. This optimal path is shown below:
While this path was only about half a percent faster than simply proceeding across the main diagonal, it was nevertheless Alice’s best option.
By the way, there was another very cool way to solve this puzzle. Quite a few readers who were familiar with physics (specifically, optics) recognized that, per Fermat’s principle, light similarly takes the fastest path when traveling between media of varying speeds. As light switches from one medium to another, its angles from the normal (the line perpendicular to the interface) are governed by Snell’s law. Thanks to symmetry, we knew the angle coming out of the first kink was 45 degrees. According to Snell’s law, the angle 𝜙 heading into the kink was given by the equation sin(𝜙) = 0.9·sin(45°), which meant 𝜙 was approximately 39.5 degrees.
Meanwhile, as shown in the diagram above, tan(𝜙) = 1−a. Solving this equation gave you a ≈ 0.175, which was exactly the same result we just found using calculus!
Last Week’s Extra Credit
Congratulations to the (randomly selected) winner from last week: 🎻 Eli Wolfhagen 🎻 from Brooklyn, New York. I received 38 timely submissions, of which only 15 were correct, good for a 39 percent solve rate. This was a very tough one, in my opinion!
For Extra Credit, instead of a 2-by-2 chessboard, Alice now wanted to traverse an 8-by-8 chessboard, as shown below. Again, she was going from the bottom-left corner of the bottom-left black square to the top-right corner of the top-right black square
As before, her speed on the white squares was 1 cm per minute, while her speed on the black squares was 0.9 cm per minute.
What was the least amount of time it would have taken her to reach the finish?
Keep reading with a 7-day free trial
Subscribe to Fiddler on the Proof to keep reading this post and get 7 days of free access to the full post archives.