### Equal Averages

Comment

1. There are other sets of five positive whole numbers where mean=median=mode=range.
2. There are 33 sets where mean=median=mode=range=100

*I should mention that sets with all five numbers being distinct are not taken into account since, after exploring the web a little bit, it seems that those type of sets are considered to have no mode at all (plus it gets pretty messy if we add those type of sets as solutions). So the set {2,3,4,5,6} that was mentioned by the first commenter is not a solution.

We'll start with expressing the equations for the mean, median and range first, as they are pretty straightforward, and deal with the mode later.
So for well-ordered sets of five positive whole numbers, and where we denote mean=median=mode=range=a, we get:

1. Mean: (x1+x2+x3+x4+x5)/5=a , or x1+x2+x3+x4+x5=5a
2. Median: x3=a
3. Range: x5-x1=a, or x5=x1+a

Substitute (2) & (3) into (1) to get:
(Eq.1) 2x1+x2+x4=3a

Now let's deal with the mode. With a well-ordered set of five numbers, there are 3 possible combinations for the mode:

1. x2=x3=a, x4 and x5 may or may not be the same
2. x3=x4=a, x1 and x2 may or may not be the same
3. x2=x3=x4=a

For the first case Eq.1 becomes x4=2(a-x1). Since the set is well-ordered we can write x3<x4≤x5, or a<x4≤x1+a, or a<2(a-x1)≤x1+a. After a few algebraic manipulations on this inequality, we get a/3≤x1<a/2.
For the second case Eq.1 becomes x2=2(a-x1). After applying the same logic and math procedure as before we get, a/2<x1≤2a/3.
The third case is the simplest. Just substitute x2=x4=a (x3 is already equal a since it's the median) into Eq.1 to get, x1=a/2.

Let's summarize all the important relations:

1. x3=a
2. x5=x1+a
3. When x2=a, x1 takes positive whole values a/3≤x1<a/2 and x4=2(a-x1)
4. When x4=a, x1 takes positive whole values a/2<x1≤2a/3 and x2=2(a-x1)
5. When x2=x4=a, x1 takes positive whole value x1=a/2

Let's see two examples:

1. a=5. For the case x2=a, the inequality for x1 is 1.66≤x1<2.5, thus x1 can only take the value 2. In this case x4=2(5-2)=6, x5=2+5=7 and the set is {2,5,5,6,7} just like presented in the article.
For the case x4=a, the inequality for x1 is 2.5≤x1<3.33, thus x1 can only take the value 3. In this case x2=2(5-3)=4, x5=3+5=8 and the set is {2,4,5,5,8}.
For the case x2=x4=a, x1=5/2=2.5 which is impossible since x1 can only have integer values. This means that there is no set where the mode occurs three times.
2. Before continuing to the next example, we can notice that x1 takes the same amount of values whether x2=a or x4=a. So for example, if x1 took two values from the inequality a/3≤x1<a/2 then it will take two values from the inequality a/2<x1≤2a/3. So to count the number of solutions, we only need to consider one inequality and double the amount of values that x1 took. If a is even then we have one more solution and if a is odd then we dont. With this in mind let's continue to the second example:

3. a=100. For the case x2=a, the inequality for x1 is 33.33≤x1<50, thus x1 can only take the values 34,35,...,49, which is a total of 16 values. Double that number because from the second inequality we'll also get 16 values for x1, and add 1 because a=100 is even. So we have a total of 16+16+1=33 sets where mean=median=mode=range=100

An observation that I made is that when a is even, starting with a=2, the number of sets that satisfy mean=median=mode=range=a are:
1,1,3,3,3,5,5,5,7,7,7,9,9,9,... and so on. And for a odd, starting with a=1, we have: 0,2,2,2,4,4,4,6,6,6,8,8,8,... and so on. So clearly there is a pattern yet I'm not sure how to immediately know the number of sets that satisfy mean=median=mode=range directly from the value of a.

When I do take into account sets where all five numbers are distinct, I get into pretty ugly mess of inequalities which are not so easily solved. But I did manage to find a limit to the number of sets. If all numbers are distinct and x3 must be equal to a because it's the median, then x1 can take at maximum (a-2) values (in this case x2=a-1). So for example when a=100, then x3=100, x2=99 and x1 can at maximum take 98 vlaues (1,..,98). Thus the maximum number of sets that will satisfy mean=median=mode=range is 33+98=131. I'm pretty sure that the actual amount of sets that satisfy our condition is way lower since a few inequalities are involved and many of them won't be satisfied.

That's It! If you read up until now then thank you very much! :)
I'd love to hear some feedback!