title: Erlang: list flattening
body: <p>I am newbie at Erlang, and I am trying to write some function which is going to return the following geometric progression for given <code>N -&gt;  2, 4, .... 2^N</code>  as a list.
  I have written some code:</p>
  
  <pre><code>-module(mymod).
  -export([create_list/1]).
  
  create_list(1) -&gt; [2];
  create_list(N) when N&gt;1 -&gt;
    lists:flatten([create_list(N-1)]++[trunc(math:pow(2, N))]).
  </code></pre>
  
  <p>It works fine till 29, but after I pass 30 and more it returns the same result:
  <code>[2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,
   65536,131072,262144,524288,1048576,2097152,4194304,8388608,
   16777216,33554432,67108864,134217728,268435456,536870912|...]</code></p>
  
  <p>That is, only the first 29 terms. What to do to display fully?</p>