• Welcome to the Internet Infidels Discussion Board.

Sums of consecutive whole numbers

Swammerdami

Squadron Leader
Joined
Dec 15, 2017
Messages
7,018
Location
Land of Smiles
Basic Beliefs
sarcasm
(No posts in this subforum for three months.)

Here's a nifty puzzle in arithmetic I just stumbled upon. It's too easy to excite serious mathematicians, but hard enough to challenge talented amateurs. Perfect!

Consider numbers that are equal to the sum of two or more consecutive positive integers. For examples 3=1+2; 9=2+3+4; 26=5+6+7+8.

Two puzzles:
(1) Determine the set of positive integers which CAN be expressed as the sum of two or more consecutive positive integers.
(Or equivalently, Determine the set of positive integers which CANNOT be expressed as the sum of two or more consecutive positive integers.)

(2) Prove your result.

(Nitpicking detail: replace "positive" with "non-negative" and one more case emerges: 1=0+1. Treat this special case whichever way you prefer.)
 
Bravo Bomb#20 !!

As for Puzzle 2:
There *might* be a nifty proof based on base-2 arithmetic (Bomb#20's solutions have a special form) but I don't know how to do that.

I think I have a simple proof that starts with the observation that the b'th triangular number is
b×(b+1)÷2
 
Here's half a proof:

The average of a sequence of an odd number of consecutive natural numbers is just the middle number, so the sum is just that middle number times the number of numbers, which is odd. So the sum is divisible by an odd number higher than 1.

A sequence of an even number of consecutive natural numbers doesn't have a middle number; it has a middle pair which is two adjacent numbers x and x+1 that add up to 2x+1, an odd number higher than 1. The middle pair is surrounded by another pair x-1 and x+2 that add up to the same odd number 2x+1. That pair is surrounded by another pair adding up to 2x+1, and so on through the whole sequence. The whole sequence adds up to some multiple of 2x+1. So once again the sum is divisible by an odd number higher than 1.

Powers of 2 are not divisible by odd numbers higher than 1. Therefore a sequence of natural numbers cannot add up to a power of 2.

 
Bravo again, Mr. Bomb!

We seek to prove that
A whole number is NOT the sum of two or more consecutive whole numbers
IF AND ONLY IF​
that whole number is a power of two
.​

You have proven the IF part. Left to prove is the ONLY IF.
 
Second half of proof:
What we have left are whole numbers with at least one odd factor. This we must prove can be represented as the sum of a consecutive sequence of whole numbers. It does not matter if they can be represented by more than one such sequence, we only need to show one and show it works for any generic whole number > 1 (all whole numbers > 1).

Let n = such whole number > 1 such that it is divisible by some odd factor k
Let p = n/k, then also p is a whole number

p = n / k ==> n = p * k

This is close to B20's first paragraph:
We take a sequence of k integers about p so that their center is p. We will have some number to the right of p, and some number to the left of p: ..., p-3, p-2, p-11, p, p+1, p+2, p+3, ... k is odd, so we could rewrite this as p-x, .... p, ... p+x where k = 2x+1. Not necessary.

So we have k numbers in the sequence and p is their center and average. Their sum is the whole number.

Now some of the numbers in the sequence can be negative integers. But since their sum is positive, their center is positive. This means that for any negative integer, there exists a positive integer in the sequence with the same magnitude. They, thus "cancel" each other. Likewise, a 0 in the sequence can be canceled since it is superfluous.

So we are left with a sequence of consecutive positive numbers whose sum is the natural number with an odd factor.

Examples:
25 = 5*5; n = 25; p = 5; k = 5; x = 2
3 + 4 + 5 + 6 + 7

10 = 2 * 5; n = 10; p = 2, k = 5, x = 2
0 + 1 + 2 + 3 + 4 = 10 which we can rewrite as 1 + 2 + 3 + 4

7 = 1 * 7; n = 7; p = 1; k = 7; x = 3
-2 + -1 + 0 + 1 + 2 + 3 + 4 = 7 which we can rewrite as 3 + 4
 
Last edited:
And Kudos to Don2 too!

The solutions by Bomb#20 and Don2 (Don1 Revised) -- (may I call you Don2?) are much more straightforward than mine.

My approach is guaranteed to point to ALL ways to express the desired sum.
These appear to be the very same solution set that Don2 shows.

I'll just give the briefest outline:
The number of terms is either even (k=2x) or odd (k=2x+1).
In the even case, all numbers (x)(2x+2b+1) [with b≥0, x≥1] can be represented.
In the odd case, all numbers (2x+1)(x+b+1) [with b≥0, x≥1] can be represented.

For example, using 42 as the starting whole number, Don2's solution starts with its only odd factors 3, 7, 21
14 = 42/3 ===> 13+14+15
6 = 42/7 ===> 3+4+5+6+7+8+9
2 = 42/21 ===> -8+-7+-6+... +6+7+8 +9+10+11+12 = 9+10+11+12
These correspond to my (k,b) = (3,12) ; (7,2) ; (4,8)

I THINK -- maybe -- that the only solutions are the 1 solution per odd factor that Don2 derives.
Probably one of you will beat me to a proof of that fact.

Pedantic nitpickety Nitpick:
Somewhere near Don2's
"They, thus "cancel" each other. Likewise, a 0 in the sequence can be canceled since it is superfluous."​
I'd insert something like
"Obviously after the canceling we are left with at least TWO positive integers as required."​
 
I'll take a stab at this puzzle.


Positive integers 1 and 2 cannot be expressed in this fashion, so we must consider all the rest.

The sum of all integers from n1 to n2 is (1/2) * (n1+n2) * (n2-n1+1)

Let n2 = n1+1. Then the sum is 2*n1+1. That means that every odd integer greater than one is the sum of two such integers.

So that leaves us with the even ones.

For n to n+2k, the sum is k*(n+2k-1)

For n to n+2k+1, the sum is (2k+1)*(2n+k-1)

That means for odd prime p, sums are always possible for multiples of p with a multiplying factor at least (p+1)/2.

It's hard for me to proceed further.

I have tried a numerical experiment, and I found that only powers of 2 cannot be expressed as such sums. But that result is only valid over the extent of my calculations.

 
Don's proof is a more general version of what I'd obtained. Here is what I think is a complete solution.


The sum of m-k to m+k is (2k+1)*m

For this sum to be a sum over positive integers, m > k. But if it is not, then one can omit 0, and we can have all the negative numbers cancel out all the positive ones. That gives us a sum over k-m+1 to m+k, and that is in turn (2k+1)*m.

This means that every number with an odd factor can be expressed as the sum of consecutive positive integers, and those integers can be found from the original number and that factor.

That leaves numbers without odd factors: powers of 2.

To handle that case, we do a proof by contradiction, showing that every such sum has at least one odd factor.

The sum of m to m+2k is (m+k) * (2k+1)
The sum of m to m+2k+1 is (k+1) * (2m+2k+1)

Both possibilities have at least one odd factor.

Thus, powers of 2 cannot be expressed as the sum of consecutive positive integers, and only powers of 2.

 
Back
Top Bottom