A list contains $20$ numbers. For each positive integer $n$, from $1$ to $20$, the $n$th number in the list is either $\frac{1}{2}n$ or $2n$. If the mean of the number in the list is exactly $12$ and the product of the numbers is $P$, what is the greatest possible value of $\frac{P}{20!}$?
I have tried some examples, but they bring me nowhere. I then tried creating equations: I can call the sum of the numbers that you are halving by $a$ and the sum of the numbers that you are doubling by $b$. However, after trying repeatedly, I don't see any way to create an equation. Can I have a hint?
Also, if you are nice, may you please help me on this question($N$'s base-5 and base-6 representations, treated as base-10, yield sum $S$. For which $N$ are $S$'s rightmost two digits the same as $2N$'s?)?
Thanks!
Max0815
This is an extension to the answer provided by D.B. to confirm the stated result.
Since the mean is $12$, with $20$ numbers, the sum $S$ is such that $S / 20 = 12$, so $S = 240$. Now, for comparison, consider as an upper range that all $20$ values use $2n$, to then get a sum of
$$2\left(1 + 2 + \ldots + 19 + 20\right) = 2\frac{\left(20\right)\left(21\right)}{2} = 420 \tag{1}\label{eq1}$$
As such, this is $420 - 240 = 180$ too high. Now, for each term which used the $n/2$ value instead, it would reduce the sum by $3n/2$. As such, if the sum of these $n$ values is $S_1$, we have that that the total reduction is $3S_1/2 = 180$ giving that $S_1 = 120$. As mentioned, we want the number of these terms to be the minimum, so we start using the largest ones. Using the $7$ values $14, 15, \ldots 20$ gives a sum of $119$, meaning just need to use $1$ as well to get the sum to $120$, for a total of $8$ terms, as conjectured. Note you cannot use $7$ or less since, as just shown, the $7$ largest values add to $119$, so any other $7$ or fewer terms will add up to less than $119$, so $8$ is the minimum # of terms required.
One small thing to note is that which $8$ terms are to use $n/2$ is not uniquely defined. For example, the $1$ and $14$ terms can be replaced by any other $2$ which add to $15$, such as $2$ and $13$, $3$ and $12$, $\ldots$, $7$ and $8$.