Problem 365. Numbers with prime factors 2, 3 and 5.
Make a function which takes one positive integer n and returns a matrix with the numbers of the form (2^i)*(3^j)*(5^k) which are lower or equal to n (i,j,k integers).
Solution Stats
Problem Comments
-
3 Comments
Michael
on 25 Mar 2020
The problem statement should specify that i, j, and k are non-negative integers or the number of answers becomes infinite.
Michael
on 25 Mar 2020
Also, why is 1 not included in all of the answers. 2^0*3^0*5^0 = 1
Rafael S.T. Vieira
on 16 Jul 2020
This problem requests the set of hamming numbers without the number one for some reason. https://rosettacode.org/wiki/Hamming_numbers
Solution Comments
Show commentsProblem Recent Solvers466
Suggested Problems
-
Sum all integers from 1 to 2^n
14751 Solvers
-
Replace multiples of 5 with NaN
437 Solvers
-
520 Solvers
-
1074 Solvers
-
Number of Even Elements in Fibonacci Sequence
1261 Solvers
More from this Author2
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!