# Prove that for any integer $k>1$ and any positive integer $n$, there exist $n$ consecutive odd integers whose sum is $n^k$

Found these problems in a problem book and got stuck. The book doesn't have solutions to I've come here for help.

(1) Prove that for any integer $k>1$ and any positive integer $n$, there exist $n$ consecutive odd integers whose sum is $n^k$.

(2) Let $n$ be a positive integer and $m$ any integer of the same parity as $n$. Prove that there exist $n$ consecutive odd integers whose sum is $mn$.

-
What if $k=n=2$ ? Do we have $2$ consecutive integers whose sum is $2^2=4$ ? –  lsp Feb 1 at 9:26
odd integers @lsp 1+3 –  Semsem Feb 1 at 9:31

$(1)$ $$\sum_{r=0}^{n-1}(2a+2r-1)=\frac n2\left[2a-1+2a+2(n-1)-1\right]=n(2a+n-2)$$

$$\implies 2a+n-2=n^{k-1}\iff 2(a-1)=n(n^{k-2}-1)$$ which is even for $k\ge2$ as then $n^{k-2}-1$ will be divisible by $n-1$

$(2)$ We need $n(2a+n-2)=mn\iff 2a+n-2=m\iff m-n=2a-2$ which is even $\implies m,n$ have same parity

-
good answer, the q is : does such a exist for arbitrary k more than 1? –  Semsem Feb 1 at 9:50
@Semsem, yes; we have $$a=1+\frac{n(n^{k-2}-1)}2$$ –  lab bhattacharjee Feb 1 at 9:52
i think you have to prove that it is an integer –  Semsem Feb 1 at 9:54
@Semsem, for integer $k\ge2, (n-1)|(n^{k-2}-1)$ Now $n(n-1)$ is even, right? –  lab bhattacharjee Feb 1 at 9:55
yes it is +1 lab –  Semsem Feb 1 at 9:58

Consider question part (1)

Without loss of generality, let $r$ denote an integer, so that the $n>0$ consecutive odd integers are

$(2r+1),(2r+3),...,(2r + 2(n-1))$

The sum of these integers is

$S=\sum_{g=0}^{n-1}(2r+1+2g)$

This equals

$S=2rn+\sum_{g=0}^{n-1}(1+2g)=2rn+S_{odd}$

The second (summation) term is a sum of odd numbers $1,3,..,(2n-1)$, which evaluates to $n^2$, because

$S_{odd}=\sum_{g=0}^{n-1}(1+2g)=n+\frac{2n(n-1)}{2}=n^2$

Thus the sum of the $n$ consecutive numbers is

$S = 2rn+n^2=n(2r+n)$

To show that $S=n^k$ for integer $k>1$ it suffices to show that we can find integer $r$ such that

$2r+n=n^{k-1}$

Rearranging we have

$\large r=\frac{n^{k-1}-n}{2}=\frac{n(n^{k-2}-1)}{2}$

The numerator of the RHS is always an even number for $k>1$, because if $n$ is even then $n^{k-2}$ is even as well, so that $n^{k-2}-1$ is odd, and the product of an even and odd number is even. Thus the RHS evaluates to an integer.

Conversely, if $n$ is odd, so is $n^{k-2}$, and $n^{k-2}-1$ is even, leading to the product of an even and odd number, which is even. Thus the RHS evaluates to an integer, so long as $k>1$.

Thus there exists integer $r$ such that $(2r+n)=n^{k-1}$, so that the sum of the $n$ consecutive numbers $S$ is $n^k$.

As for question part (2), recall that the sum of the $n$ consecutive integers (for intger $r,n$) is given by

$S=n(2r+n)$

Let us denote $m=(2r+n)$, then $m$ will be the same parity as $n$ as it equals $n$ plus an even number $2r$, so that

$S=nm$

-