How can I find the sum of numbers divisible by 3 that are between 1 and 1000 if I don't know how many elements there are in the arithmetic progression?
[Math] Use of arithmetic progression to find the sum of numbers
arithmetic
arithmetic
How can I find the sum of numbers divisible by 3 that are between 1 and 1000 if I don't know how many elements there are in the arithmetic progression?
Best Answer
For guidance, I'll work a general problem:
How can I find the sum of numbers divisible by 17 between 432 and 6789?
I need to find the first element, the last element and the number of elements.
The first element $a_S =17 \left\lceil \frac{432}{17} \right\rceil = 17\times 26 = 442$
The last element $a_E = 17 \left\lfloor \frac{6789}{17} \right\rfloor = 17\times 399 = 6783$
Number of elements $N= 399-26+1 = 374$
Sum: $$S=\frac{N(a_S+a_E)}{2}=\frac{374(442+6783)}{2} = 13521075$$
Note: $\lceil x\rceil$ means round $x$ up to the nearest integer, and $\lfloor x\rfloor$ means round down.