# Thread: How many squares ?

1. ## How many squares ?

are there in total ?
<table align="center"><tr><td align="center"><table border="1"><tr><td width="10" height="10">

2. ## Re: How many squares ?

They all look like rectangles to me <img src=/S/grin.gif border=0 alt=grin width=15 height=15>.

Alan

3. ## Re: How many squares ?

ok, how many squares (or rectangles, depending on your browser settings) are there ? <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

4. ## Re: How many squares ?

<span style="background-color: #FFFF00; color: #FFFF00; font-weight: bold">none? they all only have 2 sides?</span hide>

5. ## Re: How many squares ?

<span style="background-color: #FFFF00; color: #FFFF00; font-weight: bold">There are 12*12 squares of size 1 by 1, 11*11 squares of size 2 by 2, etc. So the total number is

12*12 + 11*11 + ... + 2*2 + 1*1 = 650

The general formula for an n by n grid is n*(n+1)*(2*n+1)/6</span hide>

6. ## Re: How many squares ?

If you are wanting total SQUARES then...
<span style="background-color: #FFFF00; color: #FFFF00; font-weight: bold">12*12 + 6*6 + 4*3 + 1 = 193</span hide>

7. ## Re: How many squares ?

while you got the correct result, I think it's a lot simpler to use this formula: (1² + 2² + 3² ... + 12²)

8. ## Re: How many squares ?

That's basically what I had, but how are you going to compute that quickly for, say, a 50 by 50 grid?

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•