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

50 Solutions

29 Solvers

Last Solution submitted on Dec 16, 2025

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...