2

For an integer $x > 6$ and an uneven prime number $p$ the following conditions seem equivalent:
(1) There is an integer $0<a<x-1$ such that $x \mid 1+a^p$
(2) $p \mid \phi(x)$

Is my reasoning below correct?

$(1) \Rightarrow (2)$. Pérez-Cacho's totient lemma is as follows. Let $x$, $y$ be nonzero relatively prime integers, let $n>2$ be an integer, and let $p$ be any prime factor of $n$, assume $n = pm$. Let $z$ be any integer such that $z \ge 3$, $z \mid x^n \pm y^n$, but $z$ does not divide $x^m \pm y^m$. Then $p \mid \phi(z)$. See for a proof Ribenboim, Paulo, Fermat’s Last Theorem for amateurs chapter VIII, page 253-254 (1999).
As $x$ does not divide $1+a$ and $x \ge3$, we conclude by Pérez-Cacho's totient lemma that $p \mid \phi(x)$.

$(1) \Leftarrow (2)$. As $p \mid \phi(x)$, at least one prime divisor $q$ of $x$ can be written as $q=2kp+1$. This implies that we have $\gcd(p,q-1)=p$ solutions of $a^p \equiv -1 \pmod{q}$.
Assume $x=q^mx'$ with $q^m$ and $x'$ coprime. By Hensel's lifting lemma we have also $p$ solutions of $a^p \equiv -1 \pmod{q^m}$. Choose a solution $a_q$ unequal to $q^m-1$. By Bézout's lemma there exist integers $s,t$ such that $sq^m+tx'=1$. Then $a=sq^m(x'-1)+tx'a_q$ fulfills the requirement. Modulo $x'$ we have $a^p \equiv \big(sq^m(-1)+0\big)^p \equiv \big(tx'-1\big)^p \equiv -1 \pmod{x'}$ and modulo $q^m$ we have $a^p \equiv (tx'a_q)^p=\big((1-sq^m)a_q\big)^p \equiv (a_q)^p \equiv -1 \pmod{q^m}$. The Chinese remainder theorem implies that $a^p \equiv -1 \pmod{q^mx'=x}$.

Origin. I applied Sylvester's counting theorem assuming $x^p+y^p=z^p$ for an uneven prime $p$ and non-zero coprime integers $x,y,z$. As $z <x+y$ we have by Sylvester unique integers $0 \le u <y,0 \le v<x$ such that $xy-x-y-z=ux+vy$. Hence $(xy-(u+1)x-(v+1)y)^p=z^p=x^p+y^p$. Modulo $x$ this implies $(-(v+1)y)^p=-(v+1)^py^p \equiv y^p \mod(x)$ as $p$ is uneven. Because $x$ and $y$ are coprime, we conclude that $x \mid 1+(v+1)^p$.
But assuming a FLT counterexample, also Pérez-Cacho's totient lemma can be applied to conclude that $p \mid \phi(x)$. I noticed that these two findings are related.

If correct, the statement shows a nice connection between Euler's totient function, Bézout's lemma, the Chinese remainder theorem, Pérez-Cacho's totient lemma, Hensel's lifting lemma and Sylvester's counting theorem.

Rolandb
  • 435
  • The condition $a^p\equiv -1 \pmod x$ (and $a\not \equiv -1\pmod x$) implies $a$ has order $2p$ in $\left(\mathbb Z/x\mathbb Z\right)^*$. Thus $2p,|,\varphi(x)$. – lulu Dec 26 '18 at 15:29

0 Answers0