Solution:
Answer: 503, 1509
Let x denote the number Tom chooses. By the symmetry of the problem, picking x and picking 2012−x yield the same expected profit. If Tom picks 1006, Dick sees that if he picks 1007, Harry's best play is to pick 1005, and Dick will win with probability 20111005, and clearly this is the best outcome he can achieve. So Dick will pick 1007 (or 1005) and Harry will pick 1005 (or 1007), and Tom will win with probability 20111. Picking the number 2 will make the probability of winning at least 20112 since Dick and Harry would both be foolish to pick 1, so picking 1006 is suboptimal. It is now clear that the answer to the problem is some pair (x,2012−x).
By the symmetry of the problem we can assume without loss of generality that 1≤x≤1005. We will show that of these choices, x=503 maximizes Tom's expected profit. The trick is to examine the relationship between Tom's choice and Dick's choice. We claim that (a) if x>503, Dick's choice is 2013−x and (b) if x<503, Dick's choice is 1341+⌊3x+1⌋. Let y denote the number Dick chooses.
Proof (a). Note first that if x>503, 2013−x is the smallest value of y for which Harry always chooses a number less than x. This is obvious, for if y<2011−x, a choice of 2012−x will give Harry a greater expected profit than a choice of any number less than x, and if y=2012−x, Harry never chooses a number between x and y since x−1>22012−x−x=1006−x holds for all integers x greater than 503, so, by symmetry, Harry chooses a number less than x exactly half the time. The desired result actually follows immediately because the fact that Harry always chooses a number less than x when y=2013−x implies that there would be no point in Dick choosing a number greater than 2013−x, so it suffices to compare Dick's expected profit when y=2013−x with that of all smaller values of y, which is trivial.
Proof (b). This case is somewhat more difficult. First, it should be obvious that if x<503, Harry never chooses a number less than x. The proof is by contradiction. If y≤2011−x, Harry can obtain greater expected profit by choosing 2012−x than by choosing any number less than x. If y≥1002+x, Harry can obtain greater expected profit by choosing any number between x and y than by choosing a number less than x. Hence if Harry chooses a number less than x, x and y must satisfy y>2011−x and y<1002+x, which implies 2x>2009, contradiction. We next claim that if y≥1342+⌊3x+1⌋, then Harry chooses a number between x and y. The proof follows from the inequality 21342+⌊3x+1⌋−x>2011−(1342+⌊3x+1⌋), which is equivalent to 3⌊3x+1⌋>x−4, which is obviously true. We also claim that if y≤1340+⌊3x+1⌋ then Harry chooses a number greater than y. The proof follows from the inequality 21340+⌊3x+1⌋−x<2011−(1340+⌊3x+1⌋), which is equivalent to 3⌊3x+1⌋<x+2, which is also obviously true. Now if x≡1(mod3), then we have 3⌊3x+1⌋>x−1, so, in fact, if y=1341+⌊3x+1⌋, Harry still chooses a number between x and y. In this case it is clear that such a choice of y maximizes Dick's expected profit. It turns out that the same holds true even if x≡1(mod3); the computations are only slightly more involved. We omit them here because they bear tangential relation to the main proof.
We may conclude that if x>503, the optimal choice for x is 504, and if x<503, the optimal choice for x is 502. In the first case, y=1509, and, in the second case, y=1508. Since a choice of x=503 and y=1509 clearly outperforms both of these combinations when evaluated based on Tom's expected profit, it suffices now to show that if Tom chooses 503, Dick chooses 1509. Since the computations are routine and almost identical to those shown above, the proof is left as an exercise to the reader.