Summing Consecutive Integers from 1 to 100
Sum of numbers from 1 to 100 is an easy quant interview question on Pure Math.
This question asks for the sum of a simple, finite sequence of consecutive positive integers starting from 1 and ending at a given upper bound. The setup is a classic introductory pure mathematics problem, often used in early quant interviews or online tests to see whether a candidate reaches immediately for structure instead of brute-force computation. Rather than requiring any advanced background, it relies on recognizing a simple pattern in how the terms of a linearly increasing sequence can be organized.
To answer it efficiently, the candidate is expected to notice symmetry in the sequence and exploit it to derive a closed-form expression. The underlying techniques include recognizing arithmetic progressions, pairing terms cleverly, and translating a concrete numeric task into a general formula. Interviewers watch for whether the candidate can generalize the specific instance to the case of an arbitrary endpoint, communicate the reasoning clearly, and avoid unnecessary calculation. They may also look for an ability to check results quickly and reason about orders of magnitude.
What it tests
The sum of a sequence of consecutive integers from 1 to $n$ is governed by the principle of symmetry: each number at the start of the sequence can be paired with a number at the end so that every pair sums to the same value, specifically $n+1$. This structure arises because the sequence increases by 1 each time, so the first and last, second and second-to-last, and so on, always complement each other to the same total. The total number of such pairs is $n/2$ if $n$ is even, or $(n-1)/2$ pairs plus the middle term if $n$ is odd. This leads to the formula $n(n+1)/2$, which efficiently computes the sum by recognizing the underlying regularity rather than brute-force addition. The reason this works is that the linear growth of the sequence ensures that every offset from the start is balanced by an offset from the end, creating uniform pairs throughout.
Practise this question with written feedback, or hear it in a spoken mock interview.
Get started free