Problem 44305 Study guides, Class notes & Summaries
Looking for the best study guides, study notes and summaries about Problem 44305? On this page you'll find 1 study documents about Problem 44305.
All 1 results
Sort by
-
Matlab Cody Problem 44305. 5 Prime Numbers
- Answers • 2 pages • 2018
- Available in package deal
-
- $7.49
- + learn more

Your function will be given lower and upper integer bounds. Your task is to return a vector containing the first five prime numbers in that range that contain the number five. But, if you can't find at least five such numbers, the function should give up and return -1.

For example, for n_min = 60 and n_max = 1000, the set of prime numbers is:

 p = [61,67,71,73,79, ... 149,151,157,163, ... 241,251,257,263, ... 349,353,359,367, ... 983,991,997]

This set contains at least five numbers that c...
Want to regain your expenses?
How much did you already spend on Stuvia? Imagine there are plenty more of you out there paying for study notes, but this time YOU are the seller. Ka-ching! Discover all about earning on Stuvia