title: sequence with and without recursion
body: <p>I have a sequence.</p>
  
  <pre><code>a1 = 1 - cos(x);
  ai = a1 + (-1)^(i-1) * x^(2*i-2) / (2*i-2)!
  </code></pre>
  
  <p>I need to write this with and without recursion. But it has a different results.<br>
  Here is my code: <a href="http://codepaste.net/q213q6" rel="nofollow noreferrer">http://codepaste.net/q213q6</a></p>