Maths Olympiad Prep

Library / /364 of 520

Number theory Difficulty 6.4 National olympiad Find the answer

Example 6 Find all prime numbers pp such that 2p11p\frac{2^{p-1}-1}{p} is a perfect square.

Find all prime numbers pp such that 2p11p\frac{2^{p-1}-1}{p} is a perfect square.

A number or a short expression. Fractions can be typed as 3/2, and spacing doesn't matter.

Solution

Let pp be a prime number that satisfies the condition, then obviously pp is an odd prime. By Fermat's Little Theorem, we have

Thus,
p2p112p11=(2p121)(2p12+1)p2p121 or p2p12+1\begin{array}{c} p \mid 2^{p-1}-1 \\ 2^{p-1}-1=\left(2^{\frac{p-1}{2}}-1\right)\left(2^{\frac{p-1}{2}}+1\right) \\ p \left\lvert\, 2^{\frac{p-1}{2}}-1\right. \text { or } p \left\lvert\, 2^{\frac{p-1}{2}}+1\right. \end{array}

Since (2p121,2p12+1)=(2p121,2)=1\left(2^{\frac{p-1}{2}}-1,2^{\frac{p-1}{2}}+1\right)=\left(2^{\frac{p-1}{2}}-1,2\right)=1, one of p2p121p \left\lvert\, 2^{\frac{p-1}{2}}-1\right. and p2p12+1p \left\lvert\, 2^{\frac{p-1}{2}}+1\right. must hold.

If p2p121p \left\lvert\, 2^{\frac{p-1}{2}}-1\right., then by the condition and (2p121,2p12+1)=1\left(2^{\frac{p-1}{2}}-1,2^{\frac{p-1}{2}}+1\right)=1, there exists a positive integer xx such that

At this point,
2p12+1=x2(x1)(x+1)=2p12\begin{array}{c} 2^{\frac{p-1}{2}}+1=x^{2} \\ (x-1)(x+1)=2^{\frac{p-1}{2}} \end{array}

This indicates that x1x-1 and x+1x+1 are both powers of 2, and xx is odd, so x1x-1 and x+1x+1 are two consecutive even numbers. Therefore, it can only be
x1=2,x+1=4x-1=2, x+1=4

Thus,
x=3p=7\begin{array}{l} x=3 \\ p=7 \end{array}

If p2p12+1p \left\lvert\, 2^{\frac{p-1}{2}}+1\right., then similarly, there exists a positive integer xx such that
2p121=x2,2^{\frac{p-1}{2}}-1=x^{2},

When p>3p>3, this leads to
x2=2p1211(mod4)x^{2}=2^{\frac{p-1}{2}}-1 \equiv-1(\bmod 4)

which is a contradiction, so p=3p=3.
On the other hand, when p=3p=3 and 7, 2p11p\frac{2^{p-1}-1}{p} are 1 and 9, respectively, both of which are perfect squares. In summary, p=3p=3 or 7.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.