Skip to main content
ttokoro
21-Topaz I
21-Topaz I
September 30, 2022
Solved

Find the number of rectangles 2.

  • September 30, 2022
  • 1 reply
  • 1661 views

I find very good puzzle from YouTube and show it. Then I made new puzzle to find the number of rectangles of stair-like figures shown here. How to calculate the total number of rectangles included in this figure? I have no formula to calculate this answer, now.

First one, m=3 has 11 rectangles.

Second one, m=5 may have 54 rectangles.

How about m=7 and m=9?

image.pngimage.pngimage.png

image.png

Best answer by Werner_E

@ttokoro wrote:

I find very good puzzle from YouTube and show it. Then I made new puzzle to find the number of rectangles of stair-like figures shown here. How to calculate the total number of rectangles included in this figure? I have no formula to calculate this answer, now.

First one, m=3 has 11 rectangles.

Second one, m=5 may have 54 rectangles.

How about m=7 and m=9?

 


Here you are ( m = 2*n+1)

Werner_E_1-1667248391003.png

My function "countRect" works via brute force and could deal with any cloud of points in a grid.

But once you know the first few numbers you can search for the sequence and of course you find it in OEIS: https://oeis.org/A213840

The "n" used in OEIS is "my n" plus one.

 

1 reply

Werner_E25-Diamond IAnswer
25-Diamond I
October 31, 2022

@ttokoro wrote:

I find very good puzzle from YouTube and show it. Then I made new puzzle to find the number of rectangles of stair-like figures shown here. How to calculate the total number of rectangles included in this figure? I have no formula to calculate this answer, now.

First one, m=3 has 11 rectangles.

Second one, m=5 may have 54 rectangles.

How about m=7 and m=9?

 


Here you are ( m = 2*n+1)

Werner_E_1-1667248391003.png

My function "countRect" works via brute force and could deal with any cloud of points in a grid.

But once you know the first few numbers you can search for the sequence and of course you find it in OEIS: https://oeis.org/A213840

The "n" used in OEIS is "my n" plus one.

 

ttokoro
21-Topaz I
ttokoro21-Topaz IAuthor
21-Topaz I
November 1, 2022

image.pngimage.pngimage.png

t.t.
25-Diamond I
November 1, 2022

Werner_E_0-1667268462880.png

Here are some animations 😉

ani1.gif

Some random points:

Ani2.gif