I would claim that the correct probability to hold is somewhere around 0.999 in favor of composite if you take both boxes [...]
EDIT: Looks like I was right about probabilities, but too hasty about thinking that meant you should two-box. Omega can be malicious:
Suppose we do this Primecomb + lottery experiment a jillion times. What algorithm maximizes payout over those jillion times?
One-boxing sure seems like a good plan - usually the lottery will pay out, sometimes not, but no biggie since you can't affect it. And since there aren't that many prime numbers, the lottery and the box don't share numbers very often, though when they do you always lose the lottery.
But suppose you decide to two-box every time you see the lottery and the box have the same number. Now Omega's action is undefined - if the lottery number is composite Omega can basically choose whether you're to two-box or one-box. If we think in terms of the jillion trials of the same game, one-boxing would still be better, since when Omega undefinedly decides to make you two-box, you were going to win the lottery anyhow and could have gotten more money if Omega had decided to make you one-box.
However, if you two-box every time the numbers are the same, every time the numbers are the same you'll win the lottery. So if you see the numbers the same, it certainly sounds reasonable to try to be part of the lottery-winning group, right?
Hold up though. Suppose we get to program Omega a little bit. One version we make nice - call it Nicemega. It never makes the numbers be the same. so I always one-box and get lots of money. Another version we make mean - Meanmega. It chooses the number on the box to minimize the money it has to pay out. If you two-box when the numbers are the same, it makes you two-box whenever it can. If you are willing to two-box when the numbers are the same and you start seeing a lot of same numbers, you should switch plans, because you're probably getting Meanmega'd! So why should you two-box when you see the numbers the same, if it just means you're getting Meanmega'd?
In other words, the optimal strategy really can be globally optimal, even though sometimes it requires you to take locally bad actions. Seem a little familiar?
My favorite example for this is the Unexpected Hanging paradox.
A judge tells a condemned prisoner that he will be hanged at noon on one weekday in the following week but that the execution will be a surprise to the prisoner. He will not know the day of the hanging until the executioner knocks on his cell door at noon that day.
Having reflected on his sentence, the prisoner draws the conclusion that he will escape from the hanging. His reasoning is in several parts. He begins by concluding that the "surprise hanging" can't be on Friday, as if he hasn't been hanged by Thursday, there is only one day left - and so it won't be a surprise if he's hanged on Friday. Since the judge's sentence stipulated that the hanging would be a surprise to him, he concludes it cannot occur on Friday.
He then reasons that the surprise hanging cannot be on Thursday either, because Friday has already been eliminated and if he hasn't been hanged by Wednesday night, the hanging must occur on Thursday, making a Thursday hanging not a surprise either. By similar reasoning he concludes that the hanging can also not occur on Wednesday, Tuesday or Monday. Joyfully he retires to his cell confident that the hanging will not occur at all.
The next week, the executioner knocks on the prisoner's door at noon on Wednesday — which, despite all the above, was an utter surprise to him. Everything the judge said came true.
The question is - where was the flaw in the prisoner's logic? The answer: the only flaw is that the judge really was prepared to hang the man on Friday, even though by then it's not a surprise. Every prisoner you hang without surprise on Friday buys you four to hang with genuine surprise on the other days of the week. If you're unwilling to pay in the coin of failed surprises, you cannot buy genuine ones. If you're the judge, you roll a five-sided die and hang the prisoner on the corresponding day. If you roll Friday, then you damn well hang them on Friday to no surprise, or else you're not even really trying.
A similar logic leads to the rejection of two-boxing when you see that the numbers are the same. If you aren't willing to one-box when the lottery has rolled a Friday, er, a prime number, (and Omega has decided to be be a jerk and rub it in) then you're not ever actually one-boxing.
This post almost convinced me. I was thinking about it in terms of a similar algorithm, "one-box unless the number is obviously composite." Your argument convinced me that you should probably one-box even if Omega's number is, say, six. (Even leaving aside the fact that I'd probably mess up more than one in a thousand questions that easy.) For the reasons you said, I tentatively think that this algorithm is not actually one-boxing and is suboptimal.
But the algorithm "one-box unless the numbers are the same" is different. If you were pl...
You see two boxes and you can either take both boxes, or take only box B. Box A is transparent and contains $1000. Box B contains a visible number, say 1033. The Bank of Omega, which operates by very clear and transparent mechanisms, will pay you $1M if this number is prime, and $0 if it is composite. Omega is known to select prime numbers for Box B whenever Omega predicts that you will take only Box B; and conversely select composite numbers if Omega predicts that you will take both boxes. Omega has previously predicted correctly in 99.9% of cases.
Separately, the Numerical Lottery has randomly selected 1033 and is displaying this number on a screen nearby. The Lottery Bank, likewise operating by a clear known mechanism, will pay you $2 million if it has selected a composite number, and otherwise pay you $0. (This event will take place regardless of whether you take only B or both boxes, and both the Bank of Omega and the Lottery Bank will carry out their payment processes - you don't have to choose one game or the other.)
You previously played the game with Omega and the Numerical Lottery a few thousand times before you ran across this case where Omega's number and the Lottery number were the same, so this event is not suspicious.
Omega also knew the Lottery number before you saw it, and while making its prediction, and Omega likewise predicts correctly in 99.9% of the cases where the Lottery number happens to match Omega's number. (Omega's number is chosen independently of the lottery number, however.)
You have two minutes to make a decision, you don't have a calculator, and if you try to factor the number you will be run over by the trolley from the Ultimate Trolley Problem.
Do you take only box B, or both boxes?