Function that returns true if n is a Mersenne number
def isMersenne ( n ) : NEW_LINE INDENT while ( n != 0 ) : NEW_LINE INDENT r = n % 2 ; NEW_LINE if ( r == 0 ) : NEW_LINE INDENT return False ; NEW_LINE DEDENT n //= 2 ; NEW_LINE DEDENT return True ; NEW_LINE DEDENT