title: Big-O complexity of a piece of code
body: <p>I have a question in algorithm design about complexity. In this question a piece of code is given and I should calculate this code's complexity. 
  The pseudo-code is:</p>
  
  <pre><code>for(i=1;i&lt;=n;i++){
      j=i
      do{
          k=j;
          j = j / 2;
      }while(k is even);
  }
  </code></pre>
  
  <p>I tried this algorithm for some numbers. and I have gotten different results. for example if n = 6 this algorithm output is like below</p>
  
  <pre><code>i = 1 -&gt; executes 1 time
  i = 2 -&gt; executes 2 times
  i = 3 -&gt; executes 1 time
  i = 4 -&gt; executes 3 times
  i = 5 -&gt; executes 1 time
  i = 6 -&gt; executes 2 times
  </code></pre>
  
  <p>It doesn't have a regular theme, how should I calculate this?</p>