kaufmed is right, you won't get a lot of numbers without having your own data structure. This said, below is a solution with unsigned integers to go as far as p=31 which is Mp = 2147483647. Here is a list of those numbers in wikipedia:
http://en.wikipedia.org/wiki/Mersenne_primehere is how to get the list of numbers from the code I gave you:
for (uint i = 2; i < 31; i++)
{
if (IsMersennePrime(i))
Console.WriteLine("p:"+i + "\tMp:" + ((int)Math.Pow(2, i)-1));
}