To give credit where it is due, I got started on this formula earlier this evening after reading Kaizoku's post and the subsequent thread. So thank you to those guys, both for the lost sleep and for their discussion of the variables that need to be considered. I think I've covered all of them, but please correct me if there are any I have left out.
Incidentally, I ran my formula with Kaizoku's numbers (which were themselves copied from elsewhere), and got slightly higher results than he did: 38.76, 38.76, 38.76, 34.68, and 24.48, for a total of 175.44 average damage per round. I haven't tried yet to account specifically for the discrepancy.