1
$\begingroup$

Yesterday I was asked by a friend how many squares are in a chess board of $8\times 8$. I thought about 64 immediately, but of course this is not the solution, there are much more.

So the number of squares is: $$8\times 8 + 7\times 7 + 6\times 6 + 5\times 5 + 4\times 4 + 3\times 3 + 2\times 2 + 1\times 1=1^2 + 2^2 + 3^2 + 4^2...+ 8^2$$

I came across this formula: $$\frac{n(n + 1)(2n + 1)} 6$$

It produces the sum of squares in $n\times n$ board.

My question is, how did he reached this formula? Did he just guessed patterns until he reached a match, or there is a mathematical process behind?

If there is a mathematical process, can you please explain line by line?

Thanks very much.

Btw: Couldn't find matching tags for this question, says I can't create.

2 Answers 2

2

The first step is to recognize that there are $8^2$ squares of size $1$ by $1$, $7^2$ squares of size $2$ by $2$ and so on. That justifies the total number being, as you say, $1^2+2^2+3^2+\ldots 8^2$. Sums of powers are calculated by Faulhaber's formula. There are several ways to derive them. One way is to know or suspect that $\sum_{k=1}^n k^p$ should be of degree $p+1$. So for squares, we want $\sum_{k=1}^n k^2=an^3+bn^2+cn+d$. Then if we evaluate it at $n+1$, we get $\sum_{k=1}^{n+1} k^2=a(n+1)^3+b(n+1)^2+c(n+1)+d$. Subtracting, we get $(n+1)^2=a((n+1)^3-n^3)+b((n+1)^2-n^2)+c((n+1)^1-n^1)$ and equating the coefficients gets the desired formula. You can prove the formula rigorously by induction

  • 0
    You should say, "So for squares, $p=2$, ..." and then later you have $k^{n+1} = ...$ when you mean $k^2 = ...$2012-04-12
  • 0
    @ThomasAndrews: Thanks. Fixed. For the second it should have been $(n+1)^2$ as that is the term added to the sum.2012-04-12
  • 0
    Oops my bad, had a mistake, ignore please. Thanks for the help Ross!2012-04-12
  • 0
    I accidently marked this as solved, even though I believe your answer is correct. I'm in the stage of the substracting. Can you please write the stages after? All of these techniques are new to me, as I'm only in the 10th grade. What am I supposed to do with the coefficients? Thanks2012-04-13
  • 0
    @GuyDavid: If you take the last equation and expand the powers of $n+1$ you get $n^2+2n+1=3an^2+3an+a+2bn+b+c$ We need this to be true for all $n$, so $1=3a, 2=3a+2b, 1=a+b+c$ by equating the coefficients of each power of $n$. Solving gives $a=1/3, b=1/2, c=1/6$ Then if you check you can find $d=0$2012-04-13
  • 0
    I have made a big progress thanks to you, and I reached the final formula. "by equating the coefficients of each power of n", I skipped that part, and did as you mentioned, but what do you mean by this? Much thanks2012-04-13
  • 0
    I think I have figured what you did: Since for n^2, there is only 1 coefficients, you made it equal to 1, and because n^1 has 2 coefficients, you equaled it to 2, and because there are no n's left, you equaled the rest to 1? Am I right?2012-04-13
  • 0
    By the way, how do you write you equations that way? So it looks nice.2012-04-13
  • 0
    @GuyDavid: You use $\LaTeX$ and enclose the coding in dollar signs. If you right click on any equation and choose Show Math as ->TeX commands a window will open showing what the commands are. There are many tutorials on the web.2012-04-13
  • 0
    @GuyDavid: Re 3 comments ago: No, look at my comment before that. It is not the number of coefficients, it the the terms proportional to each power of $n$. The terms proportional to $n$ are $2n=3an+2bn$ I divided by $n$ to get $2=3a+2b$ The terms proportional to $n^0$ show that-there are three terms on the right, but the left side is $1$ because it comes from the $(n+1)^2$2012-04-13
  • 0
    Now everything is clear. Thank you for your patience, I really appreciate it. Guy2012-04-13
-1

formula to calculate the square in $m \cdot n$ order: $[n(n+1)x(3m-n+1)]/6$

  • 0
    What does "mxn order" mean? A board of size $m\times n$ perhaps? A brief sentence fragment of this kind is almost never a good answer.2014-01-12