Both the formulas by Andrew Sboev and DANGER are correct, since they are actually one and the same (you can open the brackets in DANGER's formula to prove for yourself). http://boards.straightdope.com/sdmb/archive/index.php/t-143322.html Maybe this link will help you understand why. I hope I helped you :)