The conversation between human and AI assistant.
What is the sum of the positive integers less than 150 but greater than 20 that are divisible by 7?
That's a big number! How did you calculate it so quickly?
I used a formula to calculate the sum of an arithmetic sequence. The formula is (n/2)(a + l), where n is the number of terms, a is the first term, and l is the last term. In this case, the first term is 21, the last term is 147, and the common difference is 7. So we have 130/7 + 1 = 19 terms. Therefore, the sum is (19/2)(21 + 147) = 7140.