At first glance, the given integer formula is worse regarding arbitrary precision. The first bracket term is<p><pre><code>    (4 &lt;&lt; n*(3+n))
</code></pre>
That is shifting 4 by n squared digits to the left, requiring more than n^2 binary digits.<p>I think calling this an integer formula is misleading, since in computing algorithms, by integers we normally understand the basic integer supported by an ALU. This formula, while dealing with integers in the mathematical sense, deals with arbitrary precision (or bignum, or whatever you call it) in the computing sense.