Problem 60977. Linear primes p' = mp + n
Problem statement
List the prime numbers of the form p' = mp + n for a given (m,n) couple and such that p' < k, k positive integer.
Examples
- (m,n) = (3,2) and k = 50 => p = [11, 17, 23, 41];
- (m,n) = (4,3) and k = 50 => p = [11, 23, 31, 47];
- (m,n) = (5,4) and k = 100 => p = [19, 29, 59, 89];
Forbidden functions / expressions
- regexp
- assignin
- str2num
- echo
See also
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers11
Suggested Problems
-
11 Solvers
More from this Author42
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!