Parity of Sum of n n Consecutive Positive Integers

The sum of 6 6 consecutive positive integers is always odd .

Find the number of positive integers n 2017 n\leq 2017 such that─

There is at least one sequence of n n consecutive positive integers with even sum.


The answer is 1513.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Stephen Brown
Dec 30, 2017

First, consider the case where n n is odd. A sequence of n n consecutive integers can have either n 1 2 \frac{n-1}{2} or n + 1 2 \frac{n+1}{2} odd integers. If n 1 m o d 4 n\equiv1\bmod{4} , then n 1 2 \frac{n-1}{2} is even, and if n 1 m o d 4 n\equiv-1\bmod{4} , then n + 1 2 \frac{n+1}{2} is even. If the number of odd integers in the sum is even, then the sum itself is even, so all odd n n are to be included.

Now consider even n n . In the sequence of n n consecutive integers, we will always have exactly n 2 \frac{n}{2} odd integers. If n 0 m o d 4 n\equiv0\bmod{4} , then n 2 \frac{n}{2} is even and the sum will always be even. However, if n 2 m o d 4 n\equiv2\bmod{4} , then n 2 \frac{n}{2} is odd, and the sum will always be odd, as it contains an odd number of odd integers. Thus, the only integers NOT to be included in our count are those where n 2 m o d 4 n\equiv2\bmod{4} , of which there are 504 504 less than 2017 2017 (this can be calculated as 2014 2 4 + 1 \frac{2014-2}{4}+1 ), leaving 2017 504 = 1513 2017-504=\boxed{1513} integers such that there is at least one sequence of n n consecutive positive integers with even sum.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...