View the step-by-step solution to:


Problem 1: (4 points) A Mersenne prime is a prime number that is one less than a power of 2. For example, 131071

is a Mersenne prime because 131071 + 1 = 217. Write a function named mersennes that takes an integer as a parameter and returns a list of all Mersenne primes less than the specified value. For example, this call makes a list of Mersenne primes less than 1000: >>> mersennes(1000) [3, 7, 31, 127] 

Top Answer

View the full answer

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.


Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question