I proved the 13.825 number abstractly, you didn't need to run a million experiments.
I was actually responding to Aloïsius's quote and somehow missed/skipped your post (boy do I feel dumb!)

If I had known the math for it I would have used that, but from my perspective spending 5 minutes of coding time and a second of cpu time was easier than finding the appropriate math for it

I also agree that taking a reroll is going to be better pretty much across the board with 4e's goal of 50/50 success on checks.