Problem 59511. Count the ones in a divisibility matrix
Cody Problem 59506 asked solvers to compute the determinant of matrix consisting of ones in the first column and anywhere the row index divides the column index.
Write a function to count the ones in the matrix. For example, the 4x4 matrix given in the description of Cody Problem 59506 has 11 ones, and the 1000x1000 matrix has 8068.
Solution Stats
Solution Comments
Show commentsProblem Recent Solvers3
Suggested Problems
-
Maintain shape of logical-index mask
72 Solvers
-
Combinations without using nchoosek
132 Solvers
-
39 Solvers
-
1549 Solvers
-
Chebyshev polynomials of the 1st Kind
75 Solvers
More from this Author314
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!