$$ p | 2^{(p-1)/2}-1 $$

p is prime. I can prove that if $(p-1)/2$ is composite, then $$ 2^{(p-1)/2}-1 $$ is also composite. I cannot manage to deduce anything about $p$. I'm trying to come up with some set of criteria that $p$ must fulfil such that $$ p | 2^{(p-1)/2}-1 $$

I've experimented with $$2^{(p-1)/2} \equiv 1 \pmod p$$ but didn't really get anywhere. I think this question is leading me into quadratic reciprocity, so I shouldn't need quadratic reciprocity to solve it (so should, presumably, be able to do it with things like the fundamental theorem of arithmetic, Fermat's Little Theorem, and things of that nature). I've also tried treating this as $$ (2^{(p-1)/4})(2^{(p-1)/4}) \equiv 1\pmod p$$ which looked like it was going somewhere for a while.

This is supposed to be the easy one mark intro to a much bigger question and should presumably take about sixty seconds. I've spent a few hours on it so far and got nowhere. I am terrible at number.

Edited to confirm that p is prime.

  • $\begingroup$ Are you assuming $p$ is prime? There are some pseudoprimes that satisfy this condition, e.g. $341$ and $561$. $\endgroup$ – Robert Israel Aug 21 '12 at 19:15
  • $\begingroup$ If $p$ is a prime, it is such that $2$ is a quadratic residue $(mod~p)$. $\endgroup$ – Karolis Juodelė Aug 21 '12 at 19:16
  • $\begingroup$ Yes, p is definitely a prime. "2 is a quadratic residue (mod p)"; to me, this means "there is some number that, when you square it, it is congruent to 2 mod p" (hope that's right; I stand by to be corrected). However, to me that's just magic words - I have no idea why it's true. Can it be proved from something more akin to first principles? $\endgroup$ – Moschops Aug 21 '12 at 19:21
  • 1
    $\begingroup$ @Moschops: Since you are close to getting to Reciprocity, perhaps you have already seen a proof of Euler's Criterion. and you may already have seen a proof of the fact that $2$ is a quadratic residue of the odd prime $p$ iff $p$ is of the form $8k\pm 1$. $\endgroup$ – André Nicolas Aug 21 '12 at 19:24

The problem gives you

$$2^{\frac{p-1}2} \equiv 1 \mod p$$

Euler Criteria tell you that $$\left( \frac{2}{p} \right)=1 $$


$$\left( \frac{2}{p} \right) =(-1)^\frac{p^2-1}{8}$$

This tells you what $p$ is modulo 8.

Also note that every implication is if and only if. You get that for a odd prime $p$ we have

$$2^{\frac{p-1}2} \equiv 1 \mod p \Leftrightarrow p \in \{ ..., ... \} \mod 8$$

  • $\begingroup$ $$1 = (-1)^\frac{p^2-1}{8}$$ $$\frac{p^2-1}{8}=2,4,6,8...$$ $${p^2-1}=16,32,48,62...$$ $$p^2=17,33,49,63...$$ I don't follow :( $\endgroup$ – Moschops Aug 21 '12 at 19:47
  • $\begingroup$ $p$ is either $1,3,5$ or $7$ modulo $8$. If $p=8k+r$ then $p^2=16(4k^2+kr)+r^2$. Then, $\frac{p^2-1}{2}=$even+$\frac{r^2-1}{2}$... What can $r$ be? $\endgroup$ – N. S. Aug 21 '12 at 20:18
  • $\begingroup$ I promise you, I'm not being deliberately obtuse. I push that through to get r, and r comes out as root(8-even+1) or root(16-even+1) or root(24-even+1) or root(32-even+1)... which now just gives me two unknown values. I think I'm missing completely whatever point you're making. I do this a lot in number. $\endgroup$ – Moschops Aug 21 '12 at 20:33
  • $\begingroup$ Don't try to solve $p^2-1/8=2,4,6,8...$ for $p$ or $r$, because you have too many choices. If instead you take $r$ to be the remainder when $p$ is divided by $8$, there are only $4$ values $r$ can take, and you can check which works in the equation.... $\endgroup$ – N. S. Aug 21 '12 at 20:39
  • $\begingroup$ Why are there only 4 values r can take? Why not 7? $\endgroup$ – Moschops Aug 21 '12 at 21:08

Assume $p$ is an odd prime. If $b$ is a primitive root mod $p$, $2 \equiv b^k \mod p$ for some integer $k$, and $2^{(p-1)/2} = b^{k(p-1)/2} \equiv 1 \mod p$ iff $k(p-1)/2$ is a multiple of $p-1$, i.e. iff $k$ is even. If $k$ is even, $2 \equiv (b^{k/2})^2$ is a quadratic residue mod $p$. Conversely, if $2$ is a quadratic residue, say $2 \equiv a^2 \mod p$ where $a \equiv b^m \mod p$, then $2 \equiv b^{2m}$ so $k$ is even.

  • $\begingroup$ Okay. Stupid question time - what does that tell me about p? I struggle to extract that information from your answer. $\endgroup$ – Moschops Aug 21 '12 at 19:31
  • $\begingroup$ @Moschops By the quadratic reciprocity law, this is equivalent to $p \equiv 1, 7$ (mod 8). $\endgroup$ – Makoto Kato Aug 21 '12 at 19:33
  • $\begingroup$ You say "$b$ is a primitive root mod $p$"--a primitive root of what? It looks like it should be apparent from your answer, but I'm not seeing it. $\endgroup$ – Cameron Buie Aug 21 '12 at 19:35
  • $\begingroup$ @CameronBuie: A primitive root modulo $p$ (or of $p$) is a generator $g$ of the multiplicative group modulo $p$. There is such a $g$ (indeed several) for any prime $p$. Depending on the order one does things, one might show existence of primitive roots and their basic properties in the chapter before Reciprocity, or in the chapter after. $\endgroup$ – André Nicolas Aug 21 '12 at 19:46
  • $\begingroup$ Ah! Gotcha. Thanks. $\endgroup$ – Cameron Buie Aug 21 '12 at 20:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.