Write a function to find the average of the first n prime


please show the answers in PDF format...note Mathmatica must be used prefer 6 but can accept 5.2

a) The built in function Prime[n], outputs the nth prime number. Make a function which lists the first n prime numbers using the Table command.

b) Write a function to find the average of the first n prime numbers using the Apply[Plus,..] function.

c) Make a table of ordered pairs
{n,avgprime[n]}, where n is the average
value of the first n prime numbers from b), from n = 1 to n = 250.

d) Make a plot of the ordered pairs in part c).

Solution Preview :

Prepared by a verified Expert
Algebra: Write a function to find the average of the first n prime
Reference No:- TGS01371171

Now Priced at $40 (50% Discount)

Recommended (99%)

Rated (4.3/5)