A Blum integer is a semiprime—that is, the product of two distinct primes—whose factors have the form
for some integer k. The number 21 is a Blum integer because its two prime factors, 3 and 7, have the form
with
and
. The number 123 is a semiprime because it is
, but it is not a Blum integer because 41 is not 3 more than a multiple of 4. The number 1463 is not a Blum integer: although its prime factors are distinct and each 3 more than a multiple of 4, there are three of them, not two.
Write a function to determine whether the numbers in a matrix are Blum integers.
Solution Stats
Solution Comments
Show comments
Loading...
Problem Recent Solvers8
Suggested Problems
-
30536 Solvers
-
Number of 1s in the Binary Representation of a Number
483 Solvers
-
Arrange Vector in descending order
13736 Solvers
-
Sum the entries of each column of a matrix which satisfy a logical condition.
176 Solvers
-
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
400 Solvers
More from this Author325
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!