Question: Write a function in Python to test whether an integer is prime, then write a Python script to check Goldbach's conjecture -- that every even

Write a function in Python to test whether an integer is prime,

then write a Python script to check Goldbach's conjecture -- that every even integer greater than two is the sum of two primes -- for even integers up to 5,000. For each even integer n in this range, the script should output a pair of primes (p1,p2) with the property that p1+p2=n, and p1 is the smallest prime for which p2=np1is also prime. Finally, identify the integer n in this range such that p1as described above is largest.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!