By Fermat's Little Theorem, the number is always an integer if is an odd prime. For what number of values of is a perfect square?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
I don't know if there's an easier way to do the problem, but here was my approach.
Write 2 p − 1 − 1 = p x 2 . Then ( 2 2 p − 1 − 1 ) ( 2 2 p − 1 + 1 ) = p x 2 . These two factors are relatively prime. So by unique factorization we get that one of them is a square and the other is p times a square.
There are two cases.
If 2 2 p − 1 − 1 is a square, then considering the equation mod 4 shows that 2 2 p − 1 is 1 or 2 mod 4 , so the only possibility to consider is p = 3 , which happens to work.
If 2 2 p − 1 + 1 = y 2 , then we can factor 2 2 p − 1 = ( y − 1 ) ( y + 1 ) . Since the two factors are powers of 2 that differ by 2 , they can only be 2 and 4 , so y = 3 and p = 7 , which also happens to work. So there are 2 values in all.