Counting squares... in rectangles.

Geometry Level 1

For an a × a a \times a grid of unit squares, the total number of squares of different sizes is given by:

N a × a = n = 1 a n 2 N_{a\times a} = \sum_{n=1}^a n^2

For example, for a = 5 a=5 , N 5 × 5 = 1 + 4 + 9 + 16 + 25 = 55 N_{5\times 5} = 1+4+9+16+25 = 55 . Now rather than looking at a perfect square grid, lets look at rectangular grids.

Find N a × b N_{a\times b} , the total number of squares in a a × b a \times b grid, where a > b a > b .

n = 1 b 1 ( a + n ) ( b + n ) \sum _{ n=1 }^{ b-1 }{ { (a+n })(b+n) } n = 0 b 1 ( a n ) ( b n ) \sum _{n=0}^{b-1}{ { (a-n })(b-n) } n = 1 b 1 ( b n ) 2 \sum _{ n=1 }^{ b-1 }{ { (b-n) }^{ 2 } } n = 1 b 1 ( a n ) 2 \sum _{ n=1 }^{ b-1 }{ { (a-n) }^{ 2 } }

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Martin Taylor
Sep 2, 2020

Lets express the squares as the top left corner, for example for a 3 by 3 square it can be expressed as this. this helps as it simplifies the problem ... Showing where each square goes turns the problem from a more complex puzzle into a simple geometry question.

using this information we can work out that the formula is n = 1 b 1 ( a n ) ( b n ) \boxed{\sum_{n=1}^b-1(a -n)(b-n)}

@Martin Taylor , the answer should be n = 0 b 1 ( a n ) ( b n ) \displaystyle \sum_\red{n=0}^\red{b-1}(a-n)(b-n) . See my solution. In your problem statement 1 + 4 + 9 + 16 + 25 = 55 1+4+9+16+25 = 55 and not 39 \red{39} . Why use uppercase A \red A and B \red B in diagram and question but lowercase a a and b b in answer. I have done all the changes for you.

Chew-Seong Cheong - 9 months, 1 week ago

oh thanks for pointing that out, will fix

Martin Taylor - 9 months, 1 week ago

For an a × b a \times b grid, where a > b a > b , we note that the number of 1 × 1 1\times 1 squares in the grid n 1 = a b n_1 = ab , the number of 2 × 2 2 \times 2 squares in the grid n 2 = ( a 1 ) ( b 1 ) n_2 = (a-1)(b-1) , n 3 = ( a 2 ) ( b 2 ) n_3 = (a-2)(b-2) , ... n b = ( a b + 1 ) ( b b + 1 ) n_b = (a-b+1)(b-b+1) , Therefore

N a × b = n 1 + n 2 + n 3 + + n b = a b + ( a 1 ) ( b 2 ) + ( a 2 ) ( b 2 ) + + ( a b + 1 ) ( b b + 1 ) = n = 0 b 1 ( a n ) ( b n ) \begin{aligned} N_{a \times b} & = n_1 + n_2 + n_3 + \cdots + n_b \\ & = ab + (a-1)(b-2) + (a-2)(b-2) + \cdots + (a-b+1)(b-b+1) \\ & = \boxed{\sum_{n=0}^{b-1} (a-n)(b-n)} \end{aligned}

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...