@jamestanton raised the following (implicit) question on Twitter on September 8, 2017:

In the spirit of playing around and not thinking too hard, just computing to see what might be going on, I wrote a short piece of *Mathematica®* code that will run through the primes from the through the and check when is a square:

**n = 2;**

**L = {};**

**While[n <= 1000,**

** If[IntegerQ[Sqrt[(2^(Prime[n] – 1) – 1)/Prime[n]]], **

** L = {L, Prime[n]}]; n++]**

**L = Flatten[L]**

with the result {3, 7}.

So no more primes for which is a square.

To continue in this vein I just let *Mathematica®* keep on running through the primes greater than 7, stopping only if it finds a prime for which is a square:

**n = 5;**

**While[IntegerQ[Sqrt[(2^(Prime[n] – 1) – 1)/Prime[n]]] == False, n++]**

**n**

**Prime[n]**

I kept this running, with no positive result and aborted at which point I found , and the prime to be .

So by now I was thinking that maybe and is it for primes for which is a square.

If that is indeed the case, then it would be sort of nice to figure where in the non-square numbers appears.

Now, the non-square number is .

As a reminder: is the greatest integer .

You can find this fact, for example, in Jim Tanton’s book *Mathematics Galore!* in Chapter 4.

So the idea is to find an integer for which when is prime.

If we drop the floor function temporarily we get a quadratic equation in and the smaller of the roots – which a bit of reflection tells us is the correct root – is .

Of course this root is NOT an integer, and again a bit of reflection tells us that we want the ceiling of this root, so we set .

So now the idea is to prove that if is prime and

then

This would tell us that is non-square for , and gives us something concrete with which to work.