Dsa
Math
Easy
Arithmetic Sequence Sum
Given the first term a, common difference d, and number of terms n of an arithmetic sequence, compute the sum of the sequence. The sum S of the first n terms is given by the formula S = n/2 * (2a + (n-1)d).
Example Input:
1 2 5
Example Output:
25
Key concepts
matharithmetic seriesformulas
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now