title: Calculating algorithm complexity of 1 2 4 8 pattern
body: <p>I need to calculate the complexity of this algorithm :</p>
  
  <pre><code>f=1;
  x=2;
  
  for(int i=1;i&lt;=n;i*=2)
     for(int j=1;j&lt;=i*i;j++)   
        if(j%i==0)
           for(int k=1;k&lt;=j*i;k++)
               f=x*f;
  </code></pre>
  
  <p>I figured out the pattern and the summation of the inner loop which is i^2(i(i+1)/2)
  but I can't get the summation of this pattern along the series of (1 2 4 8 16 ...)</p>
  
  <p>So, how can I find the summation of this series?</p>