The sum of $n$ consecutive numbers is divisible by the greatest prime factor of $n$.

I facilitated the following task with pre-service math teachers:

1. Take the sum of any three consecutive numbers. Do you notice anything special? Write a clear conjecture. Then write a clear proof for your conjecture.

2. Now, take the sum of any amount of consecutive numbers. Can you broaden your conjecture from problem 1? Prove your conjecture.

I left the task open because I wanted students to create a variety of conjectures and proofs for whole class discussion. For task 2, one student came up with the following conjecture: "The sum of $$n$$ consecutive integers is divisible by the greatest prime factor of $$n$$". I'm curious if anyone has a proof or counterexample for this claim as I do not.

This is an excellent conjecture. It is not quite true, as it fails for $$n=2$$. The sum of two consecutive numbers is odd. We can say more. The sum of $$n$$ consecutive numbers is divisible by $$n$$ if $$n$$ is odd and by $$\frac n2$$ if $$n$$ is even. This implies the student's conjecture for $$n \gt 2$$.

To see this, reduce all the numbers $$\bmod n$$. We will then have one each congruent to $$0,1,2,\ldots n-1 \bmod n$$. The sum of the numbers from $$0$$ to $$n-1$$ is $$\frac 12(n-1)n$$, which is divisible by $$n$$ or $$\frac n2$$ as required.

If $$n=2$$ the statement is false. Let's look at $$n>2$$.

The sum of $$n$$ consecutive numbers starting with $$a$$ is

$$z=\frac{n}{2}(2a+n-1)$$ If $$n$$ is even, $$n/2$$ is an integer containing the largest prime factor of $$n$$, hence $$z$$ is divisible by that prime factor.

If $$n$$ is odd, $$2a-1+n$$ is even and $$(2a+n-1)/2$$ is an integer. Therefore $$z$$ is divisible by $$n$$ and by all of its prime factors.

If the first of the $$n$$ summands is $$m+1$$, then the sum is $$(m+1)+(m+2)+\ldots+(m+n)=nm+1+2+\ldots+n=nm+\frac{n(n+1)}{2}.$$

• If $$n$$ is odd, say $$n=2k-1$$, this is even a multiple of $$n$$, namely $$n\cdot(m+k)$$. Then even more so, it is a multiple of e.g. the largest prime divisor of $$n$$.
• If $$n$$ is even, say $$n=2k$$, then it is at least a multiple of $$k$$, namely $$k\cdot(m+n+1)$$. This is still a multiple of the largest prime divisor of $$n$$, unless $$k=1$$.

Hence the conjecture fails only for $$n=2$$ (and is meaningless for $$n=1$$).

One simple way of seeing it is the sum of $$n$$ consecutive integers is $$n$$ times the average of the consecutive integers.

If $$n$$ is odd then the average of the consecutive integers is the middle integer and ... is an integer... so the sum is an integer times $$n$$

If $$n$$ is even then the average of the consecutive integers is this mid point between two integers. This is an integer if multiply by $$2$$ so the sum is So the sum is an integer times $$\frac n2$$ which is an integer..

So long as $$n>2$$ ($$n =2$$ is a simple oversight; $$1$$ divides $$2$$ but.....) this stronger result necessitates the student's result as $$n$$ and $$\frac n2$$ are divisible by all the primes except maybe $$2$$ (and $$2$$ is only a factor if $$n$$ is even and then $$2$$ isn't the largest prime unless $$n$$ is a power of $$2$$ and then $$2$$ does divide unless $$n =2^1$$ and then... oops.).

This is an additive form of Wilson's theorem: a set of $$\,\rm n\,$$ consectutive integers forms a complete system of residues $$\bmod n\,$$ so it is closed under negation. Its non-fixed points $$\rm -k\not\equiv k\:$$ pair up and contribute zero to the sum $$\rm\,S,\,$$ leaving only the sum of the fixed points. But $$\rm\, - k\equiv k \iff 2k\equiv 0,\,$$ hence if $$\,\rm n\,$$ is odd then $$\rm\, k\equiv 0\,$$ so $$\,\rm S\equiv 0,\,$$ and if $$\rm\: n\:$$ is even then $$\rm\ k \equiv 0,\ n/2,\,$$ so $$\rm\,S\equiv n/2.$$

Remark $$\$$ This is a special case of Wilson's theorem for groups - see this answer - which highlights the key role played by symmetry (here a negation reflection / involution).