# Find the number which is the sum of different consecutive integers

Problem: Find $n$ such that

• $n>200$
• $n$ can be written like the sum of of $5$, $6$, and $7$ consecutive integers

I'm currently studying modular arithmetic so I tried to solve witusoinh it. $$n=a+(a+1)+(a+2)+(a+3)+(a+4)$$ $$=b+(b+1)+(b+2)+(b+3)+(b+4)+(b+5)$$ $$=c+(c+1)+(c+2)+(c+3)+(c+4)+(c+5)+(c+6)$$ $$n=5a+10=6b+15=7c+21$$ So here comes the critical passage (that may be wrong) $$\begin{cases} n \mod 5 = 0 \\ n - 3 \mod 6 = 0 \\ n \mod 7 = 0 \end{cases}$$ And so I have that $n=5 \cdot (6+3) \cdot7=315$ that satisfies all the previous conditions. Also we have that $a=61$, $b=50$ and $c=42$

Is this proof correct?

Is $315$ the SMALLEST number possible greater than $200$?

• You didn't say what the problem is. Is it to find the smallest integer that can be written as the sum of 5,6 and 7 consecutive numbers? – Jorge Fernández Hidalgo Jan 25 '15 at 17:14
• yes thanks i edited – Peterix Jan 25 '15 at 17:17
• Can I know why the -1? – Peterix Jan 26 '15 at 18:21

In general the numbers that can be written as a sum of $k$ consecutive integers are the multiples of $k$ if $k$ is odd and the numbers that are congruent to $k\bmod 2k$ if $k$ is even. In this case the numbers that can be written as a sum of $5,6,7$ consecutive integers are the numbers that are multiples of $5$ and $7$ and are also congruent to $3\bmod 6$ (To solve these congruence systems you usually need the Chinese remainder theorem)
In this case however we can rephrase the requirement to have numbers that are odd and are multiples of $3,5$ and $7$. So we want numbers of the form $105\times d$ where $d$ is any odd integer.
You had a lucky break in your solutions there. Your assessment of the modular cases: $$\begin{cases} n \mod 5 = 0 \\ n - 3 \mod 6 = 0 \\ n \mod 7 = 0 \end{cases}$$ is correct, but the inference that $n=5 \cdot (6+3) \cdot7$ will satisfy this (as indeed it does) is not immediately justified.
Taking $n=5 \cdot (6+3) \cdot7 = 5 \cdot 6 \cdot 7 + 5 \cdot 3 \cdot7$, the status of this number mod 6 is dependent on $5\cdot 7 \equiv -1 \bmod 6$, and because $-3 \equiv 3 \bmod 6$, you get away with it.
Then the solutions follow from $5 \cdot 3 \cdot7=105$ as the minimum value with $\frac{5\cdot 6\cdot 7}{\gcd(5,6,7)}=210$ between solutions -- $210k+105$. Meaning that, indeed, $315$ is the smallest value greater than $200$.