What is the largest integer less than 2018 that cannot be written as a sum of two or more consecutive integers?

Unavailable Nov 20, 2018

#5**+3 **

Solution:

\(\small \text {Powers of two (2) are the only integer numbers }\\ \hspace {1.3cm}\small \text {that cannot be expressed as a sum of two or more consecutive integers. }\\ \text { }\\ \text {To solve, find the highest power of two (2) less than } 2018. \\ \lfloor \log_2 (2018)\rfloor = \lfloor {10.9787…}\rfloor\\ 2^{10} = 1024\\ \text { }\\ \mathbf {1024} \small \text { is the largest integer less than } 2018\\ \hspace {0.9cm} \small \text { that cannot be written as a sum of two or more consecutive integers. }\\ \)

**Thanks to Sir CPhill for catching my** _{fuckup}

GA

GingerAle Nov 21, 2018

#3**0 **

Tried 1996 =246+247+248+249+250+251+252+253, but no cigar!. I gave up!!.

Guest Nov 21, 2018

edited by
Guest
Nov 21, 2018

#5**+3 **

Best Answer

Solution:

\(\small \text {Powers of two (2) are the only integer numbers }\\ \hspace {1.3cm}\small \text {that cannot be expressed as a sum of two or more consecutive integers. }\\ \text { }\\ \text {To solve, find the highest power of two (2) less than } 2018. \\ \lfloor \log_2 (2018)\rfloor = \lfloor {10.9787…}\rfloor\\ 2^{10} = 1024\\ \text { }\\ \mathbf {1024} \small \text { is the largest integer less than } 2018\\ \hspace {0.9cm} \small \text { that cannot be written as a sum of two or more consecutive integers. }\\ \)

**Thanks to Sir CPhill for catching my** _{fuckup}

GA

GingerAle Nov 21, 2018

#6**+2 **

Mmmmmm....not sure about * all* perfect squares , GA

9 = 2 + 3 + 4

25 = 3 + 4 + 5 + 6 + 7

36 = 11 + 12 + 13

81 = 26 + 27 + 28

etc.....

CPhill
Nov 21, 2018

#8**+1 **

Thank you Sir CPhill. You’re right. It’s not perfect squares, it’s powers of two (2). **(2 ^{k})**

GingerAle
Nov 21, 2018

#9**+2 **

Thanks, GA......that's pretty interesting.....

Just a cursory examination of some lower powers of 2 seems to confirm this.....do you know the proof???

CPhill
Nov 21, 2018

#11**+2 **

Yes. An informal proof is not difficult to demonstrate.

Numbers that have an odd prime will have at least one sequence of consecutive numbers that returns its sum. Powers of two (2) are the only numbers that do not have odd primes, so there are no consecutive numbers that add to a power of two (2)

Contradiction (proof part 1).

Defining N as the sum of an odd number of consecutive numbers. An odd number of consecutive numbers will have as its average a whole number, that is the middle number. For this, N = a whole number (the average) * odd number (number of consecutive numbers). This means N has an odd number factor. If \(N = 2^k\) then (N) cannot have an odd number factor. **Proof by contradiction that no odd number of consecutive numbers will sum to N, if** \(N = 2^k\)

Contradiction (proof part 2)

Defining N as the sum of an even number of consecutive numbers.

An even number of consecutive numbers will have an average that is half the sum of its two middle numbers.

\(N= \frac{(m_1 + m_2)\leftarrow \tiny \text{middle nmbs}}{2} * \text {even # (number of consecutive numbers)}\\ N = (m_1 + m_2) *\frac{1}{2} * \text {even number}\\\)

The sum of any two consecutive numbers is odd. This odd number is a factor of (N).

If \(N=2^k\) then (N) cannot have an odd number factor. **Proof by contradiction that no even number of consecutive numbers will sum to N, if **\(N = 2^k \)

GA

GingerAle
Nov 21, 2018

#10**+10 **

**What is the largest integer less than 2018 that cannot be written as a sum of two or more consecutive integers?**

**Two or more consecutive integers:**

\(\small{ \begin{array}{|r|r|r|l|} \hline \text{consecutive} \\ \text{integers} \\ \hline 2 & n+(n+1) & = 2n + 1 & \text{all odd numbers} \\ \hline 3 & (n-1) + n + (n+1) & = 3n & \text{all multiples of}~3 \\ \hline 4 & (n-1) + n + (n+1)+(n+2) & = 2(2n+1) & \text{all odd numbers} \times 2 \\ \hline 5 & (n-2)+(n-1) + n + (n+1)+(n+2) & = 5n & \text{all multiples of}~5 \\ \hline 6 & & = 3(2n+1) & \text{all odd numbers} \times 3 \\ \hline 7 & & = 7n & \text{all multiples of}~7 \\ \hline 8 & & = 4(2n+1) & \text{all odd numbers} \times 4 \\ \hline 9 & & = 9n & \text{all multiples of}~9 \\ \hline 10 & & = 5(2n+1) & \text{all odd numbers} \times 5 \\ \hline 11 & & = 11n & \text{all multiples of}~11 \\ \hline 12 & & = 6(2n+1) & \text{all odd numbers} \times 6 \\ \hline \ldots & \\ \hline \end{array} }\)

**Numbers can be written as a sum of two or more consecutive integers:**

\(\begin{array}{|l|} \hline \text{Rule $1$: All odd numbers without $1$ }\\ \text{Rule $2$: All multiples of an odd number without $1$ }\\ \text{Rule $3$: All odd numbers $\times$ an even number without $1$ }\\\\ \text{In general all multiples of an odd number can be written }\\ \text{as sum of two or more consecutive integers (without 1)} \\ \hline \end{array}\)

**Example:**

\(\begin{array}{|rcll|} \hline 3 & 5 & 7 & 9 & 11 & 13 & 15 & \ldots \\ 6 & 10 & 14 & 18 & 22 & 26 & 30 & \ldots \\ 9 & 15 & 21 & 27 & 33 & 39 & 41 & \ldots \\ 12 & 20 & 28 & 36 & 44 & 52 & 60 & \ldots \\ 15 & 25 & 35 & 45 & 55 & 65 & 75 & \ldots \\ 18 & 30 & 42 & 54 & 66 & 78 & 90 & \ldots \\ 21 & 35 & 49 & 64 & 77 & 91 &105 & \ldots \\ 24 & 40 & 56 & 72 & 99 &104 &120 & \ldots \\ \ldots &\ldots &\ldots &\ldots &\ldots &\ldots &\ldots &\ldots \\ \hline \end{array}\)

So all numbers without an odd prime number in their factorisation cannot be written

as a sum of two or more consecutive integers also the number 1.

heureka Nov 21, 2018