Hacker News new | ask | show | jobs
by Someone 1240 days ago
> I was looking at a list of prime numbers in binary format and I noticed a pattern, where if 2^n - 1, a Mersenne Prime, is in the list, then (2^(n+1) - 2^(n) - 1) is also in the list.

That’s because both are equal. We have

  2^(n+1) = 2 × 2^(n) = 2^(n) + 2^(n)
so

  2^(n+1) - 2^(n) - 1
  = 2^(n) + 2^(n) - 2^(n) - 1
  = 2^(n) - 1
1 comments

Oh my goodness, you're right...