How much storage for summation of 1 to 4 billion
问题 Inspired by this question (Find an integer not among four billion given ones). How much storage space would it require to store an integer that was the summation of the numbers 1 to 4 billion? For example, 1+2+3+4+5 = 15. Summation of 1 to 1 million = 500,000,500,000. Here is an algorithm that may help 回答1: The function you link to describe how to find the n'th Triangular Number, which is defined as the sum of the n natural numbers from 1 to n. Substituting 4 billion as n into the function