Java sum of exponential numbers
<p>I have piece of this code, which is not working:</p>

<pre><code>    BigInteger sum = BigInteger.valueOf(0);
       BigInteger x =new BigInteger("1") ; 
        for(int i=0;i&lt;exp;i++){
         x*=base;
         sum=sum.add(BigInteger.valueOf(i));
       }
      System.out.println("Sum of these formula is "+ sum);
</code></pre>
