According to
this thread, the average AC for CR 20 creatures listed in the 3.5 SRD is 36.44, and the maximum is 40.
First we'll look at AC 36. With +31/+31/+31/+26/+21/+16 (3d6+21), you've got an 80% to hit with each of the first 3, then 55%, 30%, and 5%, and your average damage is 31.5. Your weighted average is (3*0.80+0.55+0.30+0.05)*31.5=103.95.
Now we'll look at AC 40. With +31/+31/+31/+26/+21/+16 (3d6+21), you've got an 60% to hit with each of the first 3, then 35%, 10%, and 5%, and your average damage is 31.5. Your weighted average is (3*0.60+0.35+0.10+0.05)*31.5=72.45.
With +51 (13d6+30), you've got a 95% chance to hit either AC 36 or AC 40, and your average damage on a successful hit is 75.5. Your weighted average is 0.95*75.5=71.725.
It looks like you'll typically want to go with more attacks.