title: Function complexity from exponential to linear
body: <p>I have following function which has exponential complexity:</p>
  
  <pre><code>c :: Integer -&gt; Integer
  c n 
     | n &lt;= 4 = n + 10
     | otherwise = c (n-1) + 2 * (c (n-4))
  </code></pre>
  
  <p>I'm struggling to make the complexity of this function to linear.</p>
  
  <p><code>c x</code> shoud terminate even if 1000 &lt; x &lt; 100000</p>