Included a file with a clear answer to see if it can find (n+1). It can :-D
Different way of creating function to avoid 'eval' inside loop.
Slight for loop optimization.
Pass 1 on making it more modular.
Merge pull request #2 from cbrewer/amd

Making it more modular.