Homepage › Solution manuals › Ivan Niven › An Introduction to the Theory of Numbers › Exercise 1.3.40* (Which natural numbers are sums of consecutive integers ?)
Exercise 1.3.40* (Which natural numbers are sums of consecutive integers ?)
Say that a positive integer is a sum of consecutive integers if there exist positive integers and such that
Prove that is so expressible if and only if it is not a power of .
Answers
Proof. If is a sum of consecutive integers, then
Therefore
(Gauss’ trick). So
We prove first that a power of is not so expressible. If , then
If is even, then is odd (and ), and if is odd, then is odd (and ). In both cases has an odd divisor greater that . This is impossible because the only divisors of greater than are powers of , where , so are all even. □
Take now which is not a power of . The decomposition of in prime factors is
where is odd and greater that (otherwise is a power of ). Thus
Consider two cases.
-
If , then define
Then
so , is a sum of consecutive integers.
-
If , then define
Then , thus
so is a sum of consecutive integers.
In both cases, is a sum of consecutive integers.
is a sum of consecutive integers if and only if is not a power of .