Photo

This week’s challenge was suggested by Sunil Singh, a regular Numberplay contributor and math consultant with Scolab, an educational technology laboratory based in Montreal. Sunil’s challenge seems impossible at first, but has a beautiful solution. Let’s try —

The Jelly Bean Jar

There is a retired mathematician who owns a candy store in your town. Not only does she sell amazing sweets, but she is also known to give challenging puzzles to all her customers. One day, in the display window is a large jar of jelly beans — a very large jar of jelly beans. And, as one might guess, there is a contest to see who can figure out how many jelly beans there are in this oversize jar. It’s not a contest to see who can come closest, it’s a contest to see who can actually figure out the exact amount.

There is a clue that is written on the jar.

“Starting tomorrow I will remove some jelly beans from the jar. The next day a random customer will remove some. Then the day after, I will remove some more. Every other day I will alternate removing jelly beans with my customers. The only rule is that nobody, including myself, can remove more than half of the remaining jelly beans. The only other thing that I can tell you is that when there is one jelly bean left, I can guarantee 100 percent that it will not be my turn to remove jelly beans! The jar is big. It contains between five and eight thousand jelly beans. Tomorrow I will remove 1,111 jelly beans.”

How many jelly beans are in the jar?

That concludes this week’s puzzle. We’ll wrap up with the latest from Hamid Naderi Yeganeh, the Iranian student whose work we periodically feature in Numberplay.

I asked Hamid to say a bit about the process behind the artwork. Here’s his response:

“The human face is a popular subject in art. And I believe we can draw everything with mathematical formulas. So I started to create a human face to show the power of mathematics in art.

“It took me almost two months to create this drawing. I found the formula of this face by a step-by-step process using Linux commands and SVG codes. I tried to find the best mathematical functions for the drawing in each step of the process.”

Photo

Thank you, Hamid! And thank you as well to Sunil for this week’s Jelly Bean challenge.

And that’s it for this week’s post. As always, once you’re able to read comments for this post, use Gary Hewitt’s Enhancer to correctly view formulas and graphics. (Click here for an intro.) And send your favorite puzzles to gary.antonick@NYTimes.com.

Solution

Check reader comments on Friday for solutions and recap by Sunil Singh.