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


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

Java sum of exponential numbers
===

I have piece of this code, which is not working:


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