I guess dynamic programming is the correct tool for this problem.
The following approach has a flaw, but illustrates the technique.
Let $f(n)$ - minimal expected total weight of all the measurements required to find the heavier coin of $n$ coins.
$f(1) = 0$ - we know the coin already.
If we choose to compare $k$ of coins, than the probability that the false coin would be measured is $2k/n$ and after the measurement we will have $k$ coins to choose from.
Otherwise (with probability $1-2k/n$) all the selected coins are good and we have to choose from $n-2k$ coins.
$f(n) = min[w(k) + (1-2k)/n * f(k) + 2k/n * f(n-2k)]$
Dynamic programming calculates this easily.
But there is a flaw in this approach.
Suppose you have a 100 coins and you narrowed your search to 10 coins. You can choose 7 of these suspected coins and put them on one side, and on the other side you put 3 (or may be even 2) of suspected coins and 7 (or 8) of the coins you are sure are fine on the other side. Let's suppose you put 2+8 coins on the second side. Depending on the measurement result you narrow your search to 7 coins (if first side is heavier), or 2 coin (if second side is heavier), or 1 coin (if equilibrium). Who knows, may be using already verified coins will give a better result!
You should calculate the probability of each of these cases and write the expression for $f(n)$ accordingly. (That is the minimum by all $k$ not in range $[1, n/2]$ but in range $[1, n-1]$.) And make sure that if you decide to put more than $n/2$ coins on one side, you have enough verified coins to fill the second side! Argghhh, messy, but doable, just need to be accurate.