# What is the largest perfect square that divides $2014^3-2013^3+2012^3-2011^3+\ldots+2^3-1^3$

I've tried this but didn't get the answer : Let $S=2014^3-2013^3+2012^3-2011^3+\ldots+2^3-1^3$

Using $n^3-(n-1)^3 = 3n^2-3n+1$, \begin{align} S &= 3(2014^2)-3(2014)+1+3(2012^2)-3(2012)+1+\ldots+3(2^2)-3(2)+1 \\&= 3\left ( 2014(2013)+2012(2011)+2010(2009)+ \ldots+2(1) \right ) + 1(1007) \\&= 3\left ( \sum_{n=1}^{1007}2n(2n-1) \right )+1007\\ =& \left ( \sum_{n=1}^{1007}4n^2-\sum_{n=1}^{1007}2n \right )+1007 \\=&\frac{12(1007)(1008)(2015)}{6}-\frac{2(1007)(1008)(3)}{2}+1007 \end{align} This is divisible by $1007$ but not by $1007^2$ which is the correct answer. Where have I gone wrong ?

• $$\sum_{k = 1}^{2n} (-1)^k k^3 = 2\sum_{k = 1}^n (2k)^3 - \sum_{k = 1}^{2n} k^3 = 16 \frac{n^2(n+1)^2}{4} - \frac{(2n)^2(2n+1)^2}{4} = n^2\bigl(4(n+1)^2 - (2n+1)^2\bigr) = n^2(4n+3).$$ – Daniel Fischer Oct 21 '16 at 11:12

\begin{align}&\frac{12(1007)(1008)(2015)}{6}-\frac{2(1007)(1008)(3)}{2}+1007 \\&=1007\left(\frac{12(1008)(2015)}{6}-\frac{2(1008)(3)}{2}+ 1\right) \\&=1007\left(2(1008)(2015)-(1008)(3)+ 1\right) \\&=1007\left(2(1007+1)(2015)-(1007+1)(3)+ 1\right) \\&=1007\left(1007(2(2015)-3)+2(2015)-3+ 1\right) \\&=1007\left(1007(2(2015)-3)+2(2015)-2\right) \\&=1007\left(1007(2(2015)-3)+2(2014)\right) \\&=1007\left(1007(2(2015)-3)+4(1007)\right) \\&=1007^2(2(2015)-3+4) \\&=1007^2(4031)\end{align}

• Thanks. I didn't knew I was this close! Is it possible to factorize this without using a calculator ? – H G Sur Oct 21 '16 at 8:23

In general you obtain, for $n^3-(n-1)^3+\cdots + 2^3-1^3$ and $n$ even the formula $$3\left(\sum_{k=1}^{n/2} 2k(2k-1)\right)+\frac{n}{2}.$$ Now it is easier to see that this is divisible by $(\frac{n}{2})^2$; and you can test this first for $n=2,4,6,\ldots$ before dealing with $n=2014$. In fact, your computation is correct, except for the last step, where you did not realize how to split of the factor $(\frac{n}{2})^2$. Working with general $n$, you do not need a calculator.

• Thanks, isn't the summation from k=1 to n/2 ? – H G Sur Oct 21 '16 at 8:25
• Oh sure, I wasn't finished with the formula yet, sorry. – Dietrich Burde Oct 21 '16 at 8:26
• Is it a property that it is divisible by $\left (\frac{n}{2} \right )^2$? – H G Sur Oct 21 '16 at 8:27
• Yes, it is. Take $n=4$. Then the formula gives $44$, which is divisible by $(4/2)^2=4$. Now assume it holds for $n$, and show it for $n+2$. – Dietrich Burde Oct 21 '16 at 8:29
• Yes, you have given one already. You only need to continue with $n^3-(n-1)^3=3n^2-3n+1$, which is true for all $n$. Divisibility, however, is something different then. – Dietrich Burde Oct 21 '16 at 9:55

\begin{align} \sum_{n=1}^{2m}(-1)^n n^3&=\sum_{n=1}^m (2n)^3-(2n-1)^3\\ &=\sum_{n=1}^m 12n^2-6n+1\\ &=\sum_{n=1}^m 24 \binom n2+6\binom n1+1\\ &=24\binom {m+1}3+6\binom {m+1}2+m\\ &=m\; \big[\;4(m+1)(m-1)+3(m+1)+1\;\big]\\ &=m^2(4m+3)\\ \end{align} which is divisible by $m^2$.

Putting $m=1007$ gives the answer required.