When I computer something inside a loop, how I can use it later?
You can save results with the help of list comprehensions.
values = [0, 1, 2, 4, 8, 16];
result = [ for(i = [0 : len(values) - 1]) [i, values[i]] ];
echo(result);
Check out the manual for more information.