Giving Sweets

We got this question in the mail from a friend yesterday:

Reeta wanted to give all the sweets in a packet to her four children.
To Abi she gave half of all the sweets plus a half.
To Bea she gave a half of all the remaining sweets plus a half, to Ceeta she gave half of all the remaining sweets plus a half, and to Diva she gave half of all the remaining sweets plus a half.
How many sweets were in the packet to begin with?
(no sweets were halved during this process)

I've seen this kind of question before, but this one is worded strangely. We will have to do some interpreting.

The friend commented I don't understand what it means by "gave half of all sweets plus half".
Let's see... half of all the (remaining) sweets seems pretty obvious, but plus a half is a bit harder to parse. Usually in these kinds of questions that amount is just an integer, so it's weird that it seems to be saying the number is 1/2. And, as it clarifies, there shouldn't be any halved sweets, so that doesn't seem to make sense.

Niko, what do you think?

Meow, what exactly isn't halved?

Well, it should be the number of sweets given to each person?
Ohhhhh, right. plus a half is only part of the amount given to each person. The half of all the (remaining) sweets makes up the rest. It is the sum of those two that must be an integer. We can just work through it the normal way, using algebra, then.

Define S: total sweets, and A,B,C,D: sweets given to Abi, Bea, Ceeta, and Diva respectively.

We don't have any sweets left over so S = A + B + C + D .

We also know the amount given at each stage in terms of S, so:

A = 1 2 S + 1 2

B = 1 2 S A + 1 2

C = 1 2 S A B + 1 2

D = 1 2 S A B C + 1 2

Let's subsitute that into the first equation:

S = 1 2 S + 1 2 + 1 2 S A + 1 2 + 1 2 S A B + 1 2 + 1 2 S A B C + 1 2

Um, okay, that's a bit long, and also we have some duplicates of variables, so let's just expand the last term:

S = A + B + C + 1 2 S A B C + 1 2 (subsitute D for the expression we got earlier)

S = A + B + C + 1 2 S 1 2 A 1 2 B 1 2 C + 1 2 (by distributing that 1/2)

S = 1 2 A + 1 2 B + 1 2 C + 1 2 S + 1 2 (we can group together the As, Bs, and Cs)

That's a bit better. Now, C:

S = 1 2 A + 1 2 B + 1 2 1 2 S A B + 1 2 + 1 2 S + 1 2 (subsitute C)

S = 1 2 A + 1 2 B + 1 4 S A B + 1 4 + 1 2 S + 1 2 (distributing)

S = 1 2 A + 1 2 B + 1 4 S 1 4 A 1 4 B + 1 4 + 1 2 S + 1 2 (distributing again)

S = 1 4 A + 1 4 B + 1 4 S + 1 4 + 1 2 S + 1 2 (grouping)

Next, B:

S = 1 4 A + 1 4 1 2 S A + 1 2 + 1 4 S + 1 4 + 1 2 S + 1 2 (subsitute B)

S = 1 4 A + 1 8 S A + 1 8 + 1 4 S + 1 4 + 1 2 S + 1 2 (distributing)

S = 1 4 A + 1 8 S 1 8 A + 1 8 + 1 4 S + 1 4 + 1 2 S + 1 2 (distributing again)

S = 1 8 A + 1 8 S + 1 8 + 1 4 S + 1 4 + 1 2 S + 1 2 (grouping)

And A:

S = 1 8 1 2 S + 1 2 + 1 8 S + 1 8 + 1 4 S + 1 4 + 1 2 S + 1 2 (subsitute A)

S = 1 16 S + 1 16 + 1 8 S + 1 8 + 1 4 S + 1 4 + 1 2 S + 1 2 (distributing one last time)

That's a nice pattern, isn't it?

S = 15 16 S + 15 16 (grouping everything together)

1 16 S = 15 16 (subtract 1516S)

S = 15 (multiply by 16)

We did it! Let's just check that it works:

A = 15 2 + 1 2 = 8 (subsituting S into the expression we got earlier)

B = 1 2 15 8 + 1 2 = 7 2 + 1 2 = 4 (same thing)

C = 1 2 15 8 4 + 1 2 = 3 2 + 1 2 = 2 (same thing)

D = 1 2 15 8 4 2 + 1 2 = 1 2 + 1 2 = 1 (same thing)

(by the way technically you're not supposed to work sideways like this but it doesn't really matter)

And putting that back into the first equation:

15 = 8 + 4 + 2 + 1

Yay!!!

Mraow! You did it! But what if we went further?
For a number of children N, where
S = C1+C2+C3+...+CN
C1 = S/2 + 1/2
C2 = (S-C1)/2 + 1/2
C3 = (S-C1-C2)/2 + 1/2
...
CN = (S-C1-C2-C3-...-CN-1)/2 + 1/2
Prove that S = 2N - 1