On my farm, there are several hens that have laid eggs. No hen has laid more than 20 eggs.
Suppose that a 1 hens have laid at least 1 egg, that a 2 hens have laid at least 2 eggs, and so on.
What could be the total number of eggs laid? Three farm consultants, Alice, Bob and Chandler have three answers:
Alice says: a 1 + a 2 + ⋯ + a 2 0
Bob says: 2 0 a 2 0 + 1 9 ( a 1 9 − a 2 0 ) + 1 8 ( a 1 8 − a 1 9 ) + ⋯ + 2 ( a 2 − a 3 ) + ( a 1 − a 2 )
Chandler says: a 1 + 2 a 2 + ⋯ + 1 9 a 1 9 + 2 0 a 2 0
Who among them must be right?
Select one or more
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Problem Loading...
Note Loading...
Set Loading...
We start by considering a simple example: One chicken that lays 20 eggs. This means that all values, from a 1 to a 2 0 , are equal to one.
We consider Chandler's guess first, and immediately discover that it is wrong. His formula gives a solution of 210 eggs. Chandler's formula would only be correct if a n gave the number of chickens that laid exactly n eggs.
Alice and Bob's solutions are both correct here, so we consider them both.
First, Bob's solution. Specifically, Bob's solution is of the form n ( a n − a n + 1 ) . Let's consider a single chicken. If the chicken has laid less than n eggs, then obviously they do not contribute to a n and a n + 1 , so they will not affect the total difference. If the chicken has laid more than n eggs, a n and a n + 1 will both be incremented, so the difference will not be affected. Only if the chicken lays n eggs will the difference a n − a n + 1 be incremented , so the term a n − a n + 1 describes the number of chickens who have laid exactly n eggs. If we define b n to be the number of chickens that lay exactly n eggs (noticing here that since no chickens lay more than 20 eggs, a 2 0 = b 2 0 ), we see Bob's expression simplify to 2 0 b 2 0 + 1 9 b 1 9 + 1 8 b 1 8 + ⋯ + 2 b 2 + b 1 It is trivial to verify that this will be the total number of eggs laid.
Last, we have Alice's solution. We notice that a chicken that lays n eggs will increment exactly n values, from a 1 to a n . Because of this, we see that this sum will count each egg that each chicken lays. As well as this, we can see that this expression is equivalent to Bob's by replacing each a n term with ( n + 1 ) a n − n a n and factoring.