Is it a Mersenne Prime?
05AB1E, 5 bytes

A positive number in the form 2n - 1 in binary only consists of 1's.

Code:

b`¹pP


Explanation:

b`      # Push each digit of the binary representation of the number onto the stack
  ¹p    # Check if the input is prime
    P   # Take the product of all these digits


Uses the CP-1252 encoding. Try it online! or Verify all test cases.