Question

Find the first 100 primes found by the classical proof of the infinitude of the set...

Find the first 100 primes found by the classical proof of the infinitude of the set of primes. That is: begin with P={2}; then form m, the sum of 1 with the product over all elements of P. Place the smallest prime factor of m into P and repeat. (For this problem, you may use FactorIntegeror similar built-in Mathematica functions.). Produce a Mathematica procedure with the above instructions.

Homework Answers

Answer #1

First We should know what is classical proof of the infinitude of the set of primes. It is a proof of existence of infinite prime numbers.

Euclid's Proof

Let's assume there are p primes p1,p2,p3.......pk.

Assume a number M= p1*p2*p3*.......*pk+1

when M is divided by any of the primes it gives remainder 1 thus it violates Fundamental theorem of Arithmetic.

Hence our assumption is wrong and there are infinite prime numbers.

Now lets come to ques p={2} m=3 -> P{2,3} m=7 -> P(2,3,7)

Pseudocode;

x=2

m=2

While(p.size()<=100){

x=m+1

arr[]=Integer.factor(x)

p.add(arr[0]) //here arr[0] denotes the smallest prime factor of x

m=m*arr[0]

}

By this you get the first 100 primes in array P.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Do the following problems. 1. Each of three barrels from a manufacturing line are classified as...
Do the following problems. 1. Each of three barrels from a manufacturing line are classified as either above (a) or below (b) the target weight. Provide the ordered sample space. 2. The heat on each of two soldered parts is measured and labeled as either low (l), medium (m), or high (h). State the number of elements in the ordered sample space. 3. Consider the set of Beatles songs with a primary writer as either Paul McCartney (P) or John...
Please summarize the below article in approximately 100 words: Monumental function in British Neolithic burial practices...
Please summarize the below article in approximately 100 words: Monumental function in British Neolithic burial practices Ian Kinnes The high-risk rate of survival for the non-megalithic series of Neolithic funerary monuments, recently re-emphasized by Piggott (1973: 34), introduces a further variable into the deductive study of burial practices. In Britain and Europe the overall distribution of monumental forms present both lacunae and a marked preponderance of cairns over earthen mounds which are in ill accord with the known or predicted...
Mini-Case: You have recently acquired a franchise for Dunkin' Donuts. You have reviewed the operations of...
Mini-Case: You have recently acquired a franchise for Dunkin' Donuts. You have reviewed the operations of the business carefully, from marketing to management, from accounting to finance. You have noticed that the store manager does not have a proper inventory policy. You want to optimize the amount of coffee that you should order at one time. The price of coffee is $4.50 per lb and it comes in 25-lb bags. The price per bag is 4.5*25 = $112.50. The store...
Please summarize the below article in approximately 100 words: BURIAL CUSTOMS AND HUMAN REMAINS IN ARCHAEOLOGY...
Please summarize the below article in approximately 100 words: BURIAL CUSTOMS AND HUMAN REMAINS IN ARCHAEOLOGY L. H. WELLS We can only ascertain the physical characteristics of ancient Man by discovering his bodily remains. It is not always realized that the chances of such remains surviving for study depend to a very con siderable extent upon Man's choice of a method of disposing of his dead. Of all possible methods, cremation is perhaps the most completely destructive; periods when this...
a)How is it possible to determine if CaCO3 is Cl- free after synthesis? b)How can the...
a)How is it possible to determine if CaCO3 is Cl- free after synthesis? b)How can the Cl- ions be remove from CaCO3 after synthesis? I should answer the questions from the following experiment but if you know the answer and you are sure, yo do not need to read experiment. Please answer correctly because i hav no chance to make wrong :(((( Physical and Chemical Properties of Pure Substances Objective The aim of today’s experiment is to learn handling chemicals...
The Business Case for Agility “The battle is not always to the strongest, nor the race...
The Business Case for Agility “The battle is not always to the strongest, nor the race to the swiftest, but that’s the way to bet ’em!”  —C. Morgan Cofer In This Chapter This chapter discusses the business case for Agility, presenting six benefits for teams and the enterprise. It also describes a financial model that shows why incremental development works. Takeaways Agility is not just about the team. There are product-management, project-management, and technical issues beyond the team’s control. Lean-Agile provides...
read Seasons of Love chapter:measuring a child's life after suicide. please answer the questions : reflect...
read Seasons of Love chapter:measuring a child's life after suicide. please answer the questions : reflect on what happens to the families when there is a suicide in the family, based on the Seasons of Love chapter...how should people be told? What details are best left unshared? below is the story These theories may have a certain face-validity, but they often neglect environmental or contextual factors that are innate to answering the question of “why” a person might engage in...
      MK Restaurant: Branding of Thai-Style Hotpot The restaurant industry is one of the most...
      MK Restaurant: Branding of Thai-Style Hotpot The restaurant industry is one of the most competitive in Thailand. With a large number of players ranging from restaurants in five-star hotels, global fast-food chains to small stalls along the streets and everything in between, the Thais are spoiled for choice. In addition, as the world becomes globalized, consumers are familiar with international dishes and would not hesitate to try new offerings from the other side of the globe. As a...
CASE STUDY ON LEADERSHIP/ Aidensfield hospital currently faces major problems with staff, management, general performance and...
CASE STUDY ON LEADERSHIP/ Aidensfield hospital currently faces major problems with staff, management, general performance and service quality. It is conceivable that these problems are related to the ‘leadership’ styles adapted by those in charge. The senior management have proposed some changes within the organisation to hopefully make improvements but making such decisions requires an in-depth understanding of what is going wrong and why. Leadership as a concept is often considered in isolation when in reality, it is coherent with...
Gender Bias in the Executive Suite Worldwide The Grant Thornton International Business Report (IBR) has described...
Gender Bias in the Executive Suite Worldwide The Grant Thornton International Business Report (IBR) has described itself as "a quarterly survey of business leaders from across the globe … surveying 11,500 businesses in 40 economies across the globe on an annual basis." 1 According to the 2011 IBR, the Asia Pacific region had a higher percentage (27 percent) of female chief executive officers (CEOs) than Europe and North America. Japan is the only Asia Pacific region exception. The report further...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT