Computer Science, asked by suhasinisuu638, 10 months ago

Write a Python script that display first ten Mersenne numbers. Mersenne number are in the form of 2n-l.

Answers

Answered by Anonymous
4

The python script to display the ten Mersenne numbers is given below :

def     Mersenne_numbers ( n ):    // function

     return     2**n-1      // formula for mersenne number

print     ( “Here are the 10 numbers : ” ) // prints statement

f o r     numb     in    r a n g e     ( 1, 11 ):    // for loop

         print     Mersenne_numbers ( numb )     // print no.

  • A Mersenne  number can be defined as a prime number that is one less than the power of two.
  • The number of known terms are 51.

Similar questions