# Set of numbers with median and mean

An odd-sized set of distinct integers between 1 and 20 (inclusive) has a mean that is 6 more than its median. What are the numbers in the set?

• I think initially I accidentally read that it has to be a set of 6 integers. Your question seems fine as stated originally. Commented Aug 3 at 4:14
• median of an even set causes too much ambiguity, so I would rather avoid it. Well spotted. Commented Aug 3 at 4:18

The numbers are

1,2,3,19,20, with mean 9 and median 3. This is the best try with 5 numbers.

Reasoning

the best try is always to put the middle number as low as possible, while putting the higher-than-middle numbers as high as possible

best try with 3 numbers is 1,2,20 with mean 7.67 and median 2

best try with 7 numbers is 1,2,3,4,18,19,20 with mean 9.57 and median 4. The difference gets worse with more elements.

Regarding even number of elements

Let's assume that the median is defined as the halfway point between the middle elements. Then the best try is to put the higher of the middle elements as low as possible (while putting all higher elements as high as possible). However this is inefficient because moving this element by 1 only changes the median by 0.5. Try it for 4 or 6 elements and you'll see why.