Finalised 3 algos to calculate sums of sequences

3 algorithms for PE problem 2. Each has strengths and weaknesses.
Algo one is easy to write, but bad R code.
Algo two is very fast, but only works on limits up to 1e16
Algo 3 is much slower (but still fast relatively speaking at 0.002s for a limit of 2e9) plus it can calculate sums for really big numbers