title: Counting recursive calls
body: <p>is there a mathematical formula to calculate how many times the recursive function is called for the following without having to check with my complier</p>
  
  <p>How many times will mystery2 be called recursively when invoked with the call 
       mystery2(1000)?</p>
  
  <pre><code> public void mystery2(int n)
     {
    if (n &lt;= 1)
      System.out.print(n);
    else 
    {
      mystery2(n / 2);            
      System.out.print(", " + n);
    }
  }
  </code></pre>
  
  <p>1, 3, 7, 15, 31, 62, 125, 250, 500, 1000  = 10 times</p>