Problem 52709. Easy Sequences 19: Length of Prime-sided Rectangle with Maximum Area
A prime-sided rectangle is a rectangle having sides represented by prime numbers. The figure below shows all the possible prime-sided rectangles whose areas are less than or equal to 25:
Given an area limit 'n', find the length (i.e. the longer side if sides are unequal) of the prime-sided rectangle, with the largest area less than or equal to 'n'.
In the figure above the rectangle with the maximum area is the 5x5 square. Therefore for n = 25 the output should be 5. For n = 100, the output should be 19, since 19 x 5 = 95 < 100. No other combination of prime sides will produce an area greater than 95 for area <= 100.
Solution Stats
Problem Comments
-
1 Comment
GeeTwo
on 7 Nov 2022
The hardest part of this problem is that it's so easy to overthink it. I went crazy thinking through things last night, but it's really simple. Rather than invent an ornithopter, put on a pair of walking shoes. Diabolical!
Solution Comments
Show commentsGroup

Generate a point cloud
- 10 Problems
- 2 Finishers
- Generate a point cloud named `Simplex-Lattice Design`
- Generate a point cloud named `Incremental Lattice Design`
- Generate a point cloud on an equilateral triangle 1
- Generate a point cloud on an equilateral triangle 2
- Generate a point cloud on an equilateral triangle 3
- Generate a point cloud on an equilateral triangle 4
- Generate a point cloud on an equilateral triangle 5
- Generate a point cloud on an equilateral triangle 6
- Generate a point cloud on an equilateral triangle 7
- Generate a point cloud on an equilateral triangle 8
Problem Recent Solvers7
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!