What is the greatest number of consecutive integers whose sum is
- A)
- B)
- C)
- D)
- E)
Answer
D
Key insight
The integers may be negative. A run from -44 up to 44 adds to 0, so adding 45 on the end gives sum 45 with 90 numbers in the run.
Solution
The problem says "integers", not "positive integers". Negative numbers are allowed, and they can cancel positive ones.
Part 1: a run of 90 integers works.
- Look at a small example first: adds to , because each number cancels its opposite. Put on the end and the sum becomes .
- Do the same with : the run adds to . Put on the end and the sum is .
- Count the run : there are negative numbers, then , then positive numbers, so integers.
Part 2: no longer run works.
- For consecutive integers, the average is the middle value. It is either a whole number (when is odd) or a number ending in (when is even).
- The sum is , so , and is a whole number.
- So must divide . No number bigger than divides , so cannot be more than . (This rules out choice (E), .)
The run of works and nothing longer can, so the greatest number is .
The answer is .
Why this works
Adding a matching negative for every positive number costs nothing, so a run can be stretched much further than you might expect. The limit comes from the average: consecutive integers always have a sum equal to times a whole or half-whole number, so must divide twice the sum. And always check whether "integers" quietly became "positive integers" in your head.
The trap
Thinking only of positive integers and answering 9 (the run 1 through 9).
Concise solution
Nothing says the integers are positive. A run that starts at and ends at sums to , so extending it one more step to gives a sum of exactly .
Take : the integers sum to . This run has terms.
Can a longer run work? The sum of consecutive integers starting at is , so and must divide . The largest divisor of is itself (with ), so is the maximum. Choice (E), , does not divide .
The answer is .
Review in the AoPS books
- Introduction to Number Theory, Chapter 1: Integers: The Basics
- Introduction to Algebra, Chapter 21: Sequences & Series (§21.1, §21.2, §21.3, §21.4)
- Introduction to Algebra, Chapter 22: Special Manipulations (§22.3)
- Introduction to Algebra, Chapter 20: Special Functions (§20.3)
Techniques
Consider the largest/smallest element or boundary case · Exploit symmetry to reduce work or pair up objects