LinearSum using Recursion