Problem 2342. Numbers spiral diagonals (Part 2)
Solution Stats
Problem Comments
-
2 Comments
Interesting problem! If I'm not mistaken, your description of the problem is not entirely accurate, however. For n = 1, the spiral matrix is just [ 1 ], for which the share of primes on the main diagonals is zero, below any given 0 < p < 1; so strictly speaking the correct answer to the problem as posed would be 1 for any p.
Nice observation, @Christian!
I have edited the question statement, it (now) asks for an odd integer greater than 1.
Solution Comments
Show commentsProblem Recent Solvers157
Suggested Problems
-
4418 Solvers
-
"Low : High - Low : High - Turn around " -- Create a subindices vector
548 Solvers
-
Get the length of a given vector
11577 Solvers
-
Count letters occurence in text, specific to words with a given length.
170 Solvers
-
Find the sides of an isosceles triangle when given its area and height from its base to apex
1976 Solvers
More from this Author43
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!