cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Find the number of rectangles 2.

ttokoro
20-Turquoise

Find the number of rectangles 2.

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

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:ttokoro)


@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.

 

View solution in original post

3 REPLIES 3
Werner_E
25-Diamond I
(To:ttokoro)


@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
20-Turquoise
(To:Werner_E)

image.pngimage.pngimage.png

Werner_E
25-Diamond I
(To:ttokoro)

Werner_E_0-1667268462880.png

Here are some animations 😉

ani1.gif

 Some random points:

Ani2.gif

 

Announcements

Top Tags