Problem 52724. Easy Sequences 20: Counting Prime-sided Rectangles
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', count the total number of prime-sided rectangles that can be formed , with areas less than or equal to 'n'.
In the figure above, we can see that there are only 9 prime-sided recatangles having areas are less than or equal to 25. Therefore, for n = 25 the output should be 9. For n = 100, there are 34 such rectangles.
NOTE: Rotations are not important and are counted only once.
Solution Stats
Problem Comments
-
1 Comment
David Hill
on 17 Sep 2021
I am getting 2 less on test 7. Not sure what the problem is.
Solution Comments
Show commentsProblem Recent Solvers6
Suggested Problems
-
Generate a vector like 1,2,2,3,3,3,4,4,4,4
10697 Solvers
-
Pandiagonal Prime Magic Square Verification
30 Solvers
-
Is this triangle right-angled?
5626 Solvers
-
(Linear) Recurrence Equations - Generalised Fibonacci-like sequences
308 Solvers
-
54 Solvers
More from this Author116
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!