This "paradox" can be solved can be solved with some easy probability calculations. Taking the case of an envelope with $100, and a second envelope with either $50 or $200:

You start with $100. If you switch, you have probability 0.5 of going to 50, and 0.5 of going to $200, so a net "gain" of $25. Simple. But can you win by switching again? No! :-). You know for certain that whether you went to $50 or $200, the first envelope contains $100. So you oscillate, by switching over and over again, between a certain $100 and a 50/50 chance of $50 or $200. It is only worthwhile switching once; switching a second time (or any even number of times) is not a smart move.

Now consider the case of two envelopes, one with $N and the other with $2N. You don't know which one you get at first, so it it worth switching? Call what you have in the first envelope $M (which is either $N or $2N). There is probability 0.5 that $M is $N, and probability 0.5 that $M is $2N. So $M = (0.5)($N) + (0.5)($2N) = $(3N/2)--what you currently have. If you switch, there are possibly two things you have done. There is 0.5 probability that you had $N and switched to $2N, and there is 0.5 probability that you had $2N and switched to $N. While this seems like the earlier case in which you start with an amount x and have a 50/50 chance of doubling or halving it, this case is different. You are either doubling the amount $N, or halving the amount $2N--these are different amounts! The amount you have on switching is the same as not switching: ${3/2)N. It makes perfect sense if you keep in mind that since we don't know which of two envelopes we have, how can we be sure we are benefiting from switching?

The reason it seems like a paradox is because we are tempted to use this value "$M" as if it were a known value. But it can be one of two different values, $N or $2N, and we must take this into account.

Note: Cf Orange Julius, my calculations reflect only probability values; and that when I say $M equals x, it actually averages out to x only after many tries. This way of writing should not affect my logic :-).