Enter a base number and range to quickly calculate the sum of all multiples within that range.
The sum of multiples can be treated as a problem of summing an arithmetic sequence. Given a base number \( b \), a starting number \( a \), and an ending number \( T \), the sum of the multiples can be calculated using the following steps:
For an arithmetic sequence, the first term is \( b \times \lceil \frac{a}{b} \rceil \), the last term is \( b \times \lfloor \frac{T}{b} \rfloor \), with a common difference of \( b \). The sum formula is:
\( S_n = \frac{n}{2} \times (a_1 + a_n) \)
where:
- \( S_n \) is the sum of the multiples,
- \( n \) is the number of multiples in the range,
- \( a_1 \) is the first multiple,
- \( a_n \) is the last multiple.
Solution:
1. Find the first and last multiples:
\( a_1 = 5 \times \lceil \frac{10}{5} \rceil = 5 \times 2 = 10 \)
\( a_n = 5 \times \lfloor \frac{50}{5} \rfloor = 5 \times 10 = 50 \)
2. Calculate the number of multiples:
\( n = \frac{50 - 10}{5} + 1 = 9 \)
3. Calculate the sum of multiples:
\( S_n = \frac{9}{2} \times (10 + 50) = \frac{9}{2} \times 60 = 270 \)
Result: 270.
4. Verification:
Find all multiples within the range and manually sum them:
The multiples of 5 within the range [10, 50] are: 10, 15, 20, 25, 30, 35, 40, 45, 50.
Summing them:
\( 10 + 15 + 20 + 25 + 30 + 35 + 40 + 45 + 50 = 270 \)
Verified Result: 270.
The formula result matches the manual calculation.
Solution:
1. Find the first and last multiples:
\( a_1 = 3 \times \lceil \frac{5}{3} \rceil = 3 \times 2 = 6 \)
\( a_n = 3 \times \lfloor \frac{25}{3} \rfloor = 3 \times 8 = 24 \)
2. Calculate the number of multiples:
\( n = \frac{24 - 6}{3} + 1 = 7 \)
3. Calculate the sum of multiples:
\( S_n = \frac{7}{2} \times (6 + 24) = \frac{7}{2} \times 30 = 105 \)
Result: 105.
4. Verification:
Find all multiples within the range and manually sum them:
The multiples of 3 within the range [5, 25] are: 6, 9, 12, 15, 18, 21, 24. Their sum is:
\( 6 + 9 + 12 + 15 + 18 + 21 + 24 = 105 \)
Verified Result: 105.
The formula result matches the manual calculation.