Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Task 3 : List of prime numbers Writing down a list of prime numbers ( 2 , 3 , 5 , 7 , 1 1
Task : List of prime numbers
Writing down a list of prime numbers we can see thatthe th prime is and the sum of the prime numbers below is
a i What is the th prime number?
ii And what is the th prime number?
b Find the sum of all the prime numbers
i below ii below Million?
Hints:
Start writing code that reproduces the examples given in the introduction. Use your
functions from Task
For parts i it is possible to nd the solution by brute force testing all numbers up to
the given limit for primality.
For parts ii you have to improve your algorithms to deal with large numbers. In case
you cannot nd an algorithm which terminates within acceptable time, explain themeasures you have taken and what options you have tested. What is the range of thelargest numbers your algorithm can handle?
After submitting the corresponding test for value checking in the CBEM Moodle with
at least one correct value you can download a pdf with additional hints. in matlab
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started