Full input/ouput tested for longer arrays of numbers.  Added IPython Notebook for testing and plotting