2^n, 2^n+1
There are probably cuteish methods, useful for very large n, but it isn't
expensive to loop 32 times or thereabouts--make a table of 2**n values if you
don't like the multiply. Then you can spend your time on the real problem.
Cheers,
Phil Hobbs
|