# A Mathematical Discussion: Fill in the Blank

I originally saw this on r/puzzles, and thought it deserved a place here. I have a solution to this puzzle, but it's really long and ugly. If anyone comes up with something simple, please share!

Two perfect logicians have the following conversation. Fill in the blank with the correct number.

Ana: "Did you know that your favorite number is the sum of the ages of my stuffed animal turtles, and that my favorite number is their product?"

Beth: "I wouldn't know because I don't know your favorite number. If you tell me your favorite number and how many stuffed animal turtles you have, would I know the ages of your stuffed animal turtles?"

Ana: "No."

Beth: "Oh, so your favorite number is ________!"

• Is 0 a possible value for age, or are those all strictly positive? May 27, 2019 at 9:46
• @elias Strictly positive integers. May 27, 2019 at 16:14

We will assume that all the ages of the stuffed animals are natural numbers (i.e. cannot be 0). Removing this assumption makes the problem impossible.

Let $$T=\{...\}$$ be the set of ages of the stuffed animals, $$P$$ be their product, and $$S$$ be their sum.

Initially, Beth knows $$S$$, but not $$P$$. For some $$S$$, we need to find a value of $$P$$ and $$|T|$$ such that knowing these things does not uniquely identify the members of $$T$$. Moreover, we know that such a combination is unique for $$S$$; if it were not unique, then Beth would not be able to determine $$P$$ simply by knowing that she couldn't determine the values of $$T$$ knowing $$P$$ and $$|T|$$.

# First Solution

Lets try some values for $$S$$. It turns out we need to go as high as

$$S=12$$

before we find a case of two sets of numbers with the same number of elements and the same product. These are;

$$T=\{1,3,4,4\} \implies P=48$$ $$T=\{2,2,2,6\} \implies P=48$$

Notice that they have the same sum, product, and number of elements. If Beth knows the product, sum, and number of elements, she still will not know the values.

However, does Beth knowing this help? Only if all other sets of numbers for the sum are uniquely defined. Well, here they are;

- $$T=\{1,1,10\} \implies P=10$$
- $$T=\{1,2,9\} \implies P=18$$
- $$T=\{1,3,8\} \implies P=24$$
- $$T=\{1,4,7\} \implies P=28$$
- $$T=\{1,5,6\} \implies P=30$$
- $$T=\{2,2,8\} \implies P=32$$
- $$T=\{2,3,7\} \implies P=42$$
- $$T=\{2,4,6\} \implies P=48$$
- $$T=\{2,5,5\} \implies P=50$$
- $$T=\{3,3,6\} \implies P=54$$
- $$T=\{3,4,5\} \implies P=60$$
- $$T=\{4,4,4\} \implies P=64$$
- $$T=\{1,1,1,9\} \implies P=9$$
- $$T=\{1,1,2,8\} \implies P=16$$
- $$T=\{1,1,3,7\} \implies P=21$$
- $$T=\{1,1,4,6\} \implies P=24$$
- $$T=\{1,1,5,5\} \implies P=25$$
- $$T=\{1,2,2,7\} \implies P=28$$
- $$T=\{1,2,3,6\} \implies P=36$$
- $$T=\{1,2,4,5\} \implies P=40$$
- $$T=\{1,3,3,5\} \implies P=45$$
- $$T=\{1,3,4,4\} \implies P=48$$ SAME!!
- $$T=\{2,2,2,6\} \implies P=48$$ SAME!!
- $$T=\{2,2,3,5\} \implies P=60$$
- $$T=\{2,2,4,4\} \implies P=64$$
- $$T=\{2,3,3,4\} \implies P=72$$
- $$T=\{3,3,3,3\} \implies P=81$$
- $$T=\{1,1,1,1,8\} \implies P=8$$
- $$T=\{1,1,1,2,7\} \implies P=14$$
- $$T=\{1,1,1,3,6\} \implies P=18$$
- $$T=\{1,1,1,4,5\} \implies P=20$$
- $$T=\{1,1,2,2,6\} \implies P=24$$
- $$T=\{1,1,2,3,5\} \implies P=30$$
- $$T=\{1,1,2,4,4\} \implies P=32$$
- $$T=\{1,2,2,2,5\} \implies P=40$$
- $$T=\{1,2,2,3,4\} \implies P=48$$
- $$T=\{2,2,2,2,4\} \implies P=64$$
- $$T=\{2,2,2,3,3\} \implies P=72$$
- $$T=\{1,1,1,1,1,7\} \implies P=7$$
- $$T=\{1,1,1,1,2,6\} \implies P=12$$
- $$T=\{1,1,1,1,3,5\} \implies P=15$$
- $$T=\{1,1,1,1,4,4\} \implies P=16$$
- $$T=\{1,1,1,2,2,5\} \implies P=20$$
- $$T=\{1,1,1,2,3,4\} \implies P=24$$
- $$T=\{1,1,2,2,2,4\} \implies P=32$$
- $$T=\{1,1,2,2,3,3\} \implies P=36$$
- $$T=\{1,2,2,2,2,3\} \implies P=48$$
- $$T=\{2,2,2,2,2,2\} \implies P=64$$

So all other sets have unique products given the same number of elements. Thus, one solution to this puzzle is:

$$S=12$$

Knowing that it is impossible to know $$T$$ given $$|T|$$ and $$P$$ lets Beth determine that

$$P=48$$

since all other combinations of $$|T|$$ and $$P$$ uniquely identify $$T$$.

# Is this unique?

However, are there answers larger than this? Lets explore!

Assume $$S \ge 13$$

Now consider:

- $$T=\{1,6,6,S-13\} \implies P=36 \times (S-13)$$
- $$T=\{2,2,9,S-13\} \implies P=36 \times (S-13)$$
- $$T=\{1,3,4,4,S-12\} \implies P=48 \times (S-12)$$
- $$T=\{2,2,2,6,S-12\} \implies P=48 \times (S-12)$$

If $$T$$ is one of the above and Beth is given $$S$$, $$P$$ and $$|T|$$, then there is no way to uniquely identify the set $$T$$. Likewise, since there are multiple values for $$P$$, Beth cannot logically determine the true value of $$P$$ even if she knows she can't get $$T$$ from knowing $$|T|$$ and $$P$$.

Thus we can rule out

$$S \ge 13$$

Making,

$$S=12, P=48$$

a unique solution.

• This should be the correct answer, you just need to show that nothing greater than 12 for the sum can't work. In addition I'm paranoid, so I'll wait for consensus from everyone else. May 27, 2019 at 16:27
• I have ruled out $S=13$ since there are multiple possibilities. May 27, 2019 at 17:49
• So I originally solved this by starting from $S=1$ and bashing through every possibility, working my way up. I guess there doesn't seem to be an easy, intuitive way to obtain 12, unless anyone else has any better ideas. May 27, 2019 at 22:14
• @greenturtle3141 To be rigorous, I think you need to go through them all. I don't see any mathematical property that can be exploited to find a set of numbers with the same sum and product. May 28, 2019 at 11:58

Edit: Trenin has found a smaller value for $$X$$ which works and I think is correct. Here is the reasoning as to why.

Ana's favourite number is

$$48$$

Reasoning

As athin pointed out, we are trying to find $$X$$, $$Y$$, and $$k$$ such that there are at least $$2$$ possibilities of $$T = \{T_1, T_2, \dots, T_k\}$$ that satisfies:

$$(1)~T_1 + T_2 + \dots + T_k = X$$
$$(2)~T_1 \times T_2 \times \dots \times T_k = Y$$

Additionally, for the given value of $$X$$, there must not be a second $$Y$$ and $$k$$ for which there are also at least $$2$$ possibilities of the above occurring. Otherwise, Beth cannot determine the product at the end.

Suppose that Beth's number $$X > 14$$.
Then, we find that the following two sets of values for $$T_i$$ have the same sum and product $$(2,2,9,X-13)$$ and $$(1,6,6,X-13)$$. Additionally, we have two more sets which also have the same sum and product $$(2,2,10, X-14)$$ and $$(1,5,8,X-14)$$. So, in general, Beth cannot determine the product uniquely from the information she's been given.

In the case $$X=14$$ we have the pair of sets $$(1,2,2,9)$$ and $$(1,1,6,6)$$ with product $$36$$ and the pair of sets $$(1,5,8)$$ and $$(2,2,10)$$ with product $$40$$. Hence, in this case, Beth would not be able to determine whether the product is $$36$$ or $$40$$. If $$X=13$$, we have the pair of sets $$(1,1,3,4,4)$$ and $$(1,2,2,2,6)$$ with product of $$48$$ and the pair of sets $$(1,6,6)$$ and $$(2,9,9)$$ with product $$36$$ so Beth would not be able to determine whether the product is $$36$$ or $$48$$ in this case. Overall this implies $$X < 13$$.

As far as I'm aware, the solution given by Trenin is the only one for the system above with $$X < 13$$.

Rogue edge case

There is an edge case in the scenario where $$X>14$$. Namely, if $$X=23$$, then both products are $$360$$. But in this case, we can construct another pair of solutions $$(2,2,5,5,9)$$ and $$(1,5,5,6,6)$$ whose product is $$900$$.

• I knew it wasn’t unique to the classic answer, I just was too lazy to find a counter example. Great find! May 27, 2019 at 13:25
• But what if Beth's number is 12 and Ana's is 48? May 27, 2019 at 16:19
• @Trenin You're right, I hadn't spotted this smaller solution. May 27, 2019 at 16:56

## Partial Solution

Beth's favorite number is:

Not $$1$$ or $$2$$, because then Ana's favorite number is trivial to be $$1$$. This is because of $$1 = 1$$ and $$2 = 1 + 1$$. (In case there can be only $$1$$ turtle, then $$2$$ is still possible.)

Thus, Beth's favorite number is $$X$$ where $$X \geq 3$$. This is because of $$X$$ can be represented as at least $$1 + 1 + \dots + 1$$ and $$1 + (X-1)$$ so there are at least $$2$$ possibilities of Ana's favorite number (which is $$1$$ or $$X-1$$).

Because Beth still won't know the ages of stuffed animal turtles, given Ana's favorite number and how many stuffed animal turtles, then we can conclude that:

Let's say there are $$k$$ turtles. If the turtles' ages are $$T = \{T_1, T_2, \dots, T_k\}$$; there should be at least $$2$$ possibilities of $$T$$ where both sum and product of them are same.

Also as @hexomino pointed out from comments, Beth then know the answer, means:

For such sum, the product should be unique.

To sums up, we want to find:

$$X$$, $$Y$$, and $$k$$ such that there are at least $$2$$ possibilities of $$T = \{T_1, T_2, \dots, T_k\}$$ that satisfies:

$$(1)~X \geq 3$$
$$(2)~T_1 + T_2 + \dots + T_k = X$$
$$(3)~T_1 \times T_2 \times \dots \times T_k = Y$$
$$(4)$$ There is no other $$Y'$$ and $$k'$$ for such $$X$$ so that $$(2), (3)$$ are also satisfied for given $$Y'$$ and $$k'$$.

• I think there is an additional restriction in that once you know $X$, you can determine $Y$ because Beth knows exactly the product at the end. This means that there is an $(X,Y,k)$ with at least two solutions and any other such triplet including $X$ has the same value for $Y$. Also we must have the $k >2$, otherwise Beth could determine the turtle values exactly from knowing $Y$ and $k$. May 27, 2019 at 11:44
• @hexomino ah, clever! I should try to fix this.. May 27, 2019 at 11:48
• @hexomino wait no, even if you know $X$, $Y$ still couldn't be determined as indicated by first spoiler.. May 27, 2019 at 11:52
• so Beth's first question is essentially "If you tell me $Y$ and $k$ can I determine the ages?" If $k<3$, then Ana would say "yes" because it's a determined system. May 27, 2019 at 11:56
• As to my first point, take your solution $(X,Y,k) = (31, 720, 3)$. For this to work, you have to know that there is no other solution $(31, Y, k)$ which has two different sums with $Y \neq 720$, otherwise Beth cannot determine $Y$. In this instance, there is another solution $(1,5,7,18)$ and $(2,3,5,21)$ which has sum $31$, product $630$ $k=4$. May 27, 2019 at 12:04