SciForums.com > Science > Physics & Math > Multi-Precison integer arithmetic: Mathematica Guru needed PDA View Full Version : Multi-Precison integer arithmetic: Mathematica Guru needed Post ReplyCreate New Thread Dinosaur05-19-10, 01:55 AMI want to get the 48 digit integer specified by 4*(2235 -1) / 3 I think Mathematica can do multi-Precision integer arithmetic. I have no software which can cope with such arithmetic. The above happens to be the number of possible bidding sequences in the game of Bridge. The current Encyclopedia of Bridge has an erroneous formula for the above & specifies the 48-digit integer. I am wondering if the correct formula was used in determining that integer, while there was a typo in the formula published. rpenner05-19-10, 03:11 AM128745650347030683120231926111609371363122697556 http://www.wolframalpha.com/input/?i=4%2822%5E35-1%29%2F3 Mathematica input: 4 ((22^35 - 1)/3) Factorization: 2^2x7^2x245411x16968421x57036911x27655724555804262 79379621 The Unix tool "bc" does integer and fixed point calculations, and an input of (22^35 - 1)* 4 / 3 also produces the above value. Another way to write this in Mathematica is http://www.wolframalpha.com/input/?i=28+Sum%5B21%5En+Binomial%5B35%2C+n%2B1%5D%2C%7B n%2C0%2C34%7D%5D 28 Sum[21^n Binomial[35, n+1],{n,0,34}] which comes from http://www.durangobill.com/BrBidHowTo.html So 28 \sum_{n=0}^{34} 21^n \left( { 35 \\ n+1 } \right ) = \sum_{n=0}^{34} \frac{28 \times 21^n \times 35 ! }{(34-n)!(n+1)!}= \frac{4}{3} \left( 22^{35} - 1 \right) = 2^2 \times 7^2 \times 245411 \times 16968421 \times 57036911\times 2765572455580426279379621 Dinosaur05-19-10, 10:40 PMR Penner: Thanx. The number from the Encyclopedia of Bridge is one higher than the numbers you posted. Oddly enough the correct formula which I posted does not include the null auction: Pass Pass Pass Pass Hence the number in the Encyclopedia is correct, but there was a typo in the formula provided. rpenner05-20-10, 03:25 PMA detailed look at Durango Bill's page(s) indicates that he does add one to the final sum (TotComb) in the computer program, accounting for (Pass,Pass,Pass,Pass). 128745650347030683120231926111609371363122697557 1 + 28 \sum_{n=0}^{34} 21^n \left( \begin{array}{c} 35 \\ n+1 \end{array} \right ) = 1 + \frac{4}{3} \left( 22^{35} - 1 \right) = \frac{4}{3} \left( 22^{35} - \frac{1}{4} \right) = 3 \times 847919 \times 2448167 \times 20673590241023359223843791716846703 Post ReplyCreate New Thread