A block fountain consists of rows of circles in which each row is a continuous block of circles (i.e., adjacent circles are tangent) and each circle in a row above the first touches exactly two circles on the previous row.
Write a function to compute the number of block fountains with n circles on the first row. For example, there are five block fountains with three circles on the first row.
Solution Stats
Problem Comments
3 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers10
Suggested Problems
-
Find relatively common elements in matrix rows
2157 Solvers
-
Given an unsigned integer x, find the largest y by rearranging the bits in x
2056 Solvers
-
Square Digits Number Chain Terminal Value (Inspired by Project Euler Problem 92)
265 Solvers
-
Create a random logical vector of N elements of which M are true.
104 Solvers
-
Approximation of Pi (vector inputs)
281 Solvers
More from this Author328
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
I believe there is an error in test 9. The last digit should be 3 rather than 5.
Yes, you're right. I double-counted two of the configurations. ;-)
The problem statement without the images is totally inadequate without the image. I'm not going to describe the problem as I think I would write it, but just explain a bit.
All circles in this problem are the same diameter, and packed hexagonally such that every circle in the same row has the same y cartesian coordinate for its center.