0

A person (Reddit user /u/C0DEV3IL) learning about the RSA cryptosystem has made an observation which, while not directly related to RSA, is related to modular arithmetic. We conjecture:

$$\text{For all }n,a\in\mathbb{Z}, \text{we have } a^{\varphi(n) + 1} \equiv a \enspace (\text{mod }n).$$

For numbers $a$ where $a \equiv 0 \enspace (\text{mod }n)$, this is trivially true.

For numbers $a$ which are elements of $\mathbb{Z}_{n}^{*}$ (the multiplicative group of integers modulo $n$), this result can easily be seen as a corollary of Euler's theorem, i.e.

$$\text{If } a \in \mathbb{Z}_{n}^{*}, \text{ then by Euler's theorem, } a^{\varphi(n)} \equiv 1 \enspace (\text{mod }n), \text{ and so } a^{\varphi(n) + 1} \equiv a \enspace (\text{mod }n).$$

Let $X_n := \mathbb{Z}_{n} \setminus ( \mathbb{Z}_{n}^{*} \cup \{0\} )$. The validity of this conjecture for $a \in X_{n}$ is not so obvious — I have not found any counterexamples, nor do I have much of an idea of how to prove this. Perhaps we can derive the result based on the cardinality of the "group" (well, the set; not truly a group since it contains no identity element) generated by each $a \in X_n$ — that is, it would suffice to show that, for each $a \in X_n$, the cardinality of $\{ a^k \text{ mod } n \mid k \in \mathbb{Z} \}$ divides $\varphi(n)$ — but I have not been able to show this, nor have I found any existing literature about such sets.

Is this a known result in number theory? Might anyone prove or disprove this?

Example

Consider the case $n = 15$, then $\mathbb{Z}_{n}^{*} = \{ 1,2,4,7,8,11,13,14 \}$, so $X_n = \{ 3,5,6,9,10,12 \}$ and $\varphi(n) := |\mathbb{Z}_{n}^{*}| = 8$. Observe:

$$\text{For all }a \in X_n, \text{ we have } a^{\varphi(n)+1} \equiv a \enspace (\text{mod }n).$$

Bill Dubuque
  • 282,220
Jivan Pal
  • 290
  • @BillDubuque Thanks for linking to the related questions, very helpful – Jivan Pal Mar 18 '20 at 21:55
  • 1
    There are many more related questions on these topics (some of which you can locate via the "Linked" questions in the sidebar of the linked threads). – Bill Dubuque Mar 18 '20 at 21:56

1 Answers1

1

This is true when $n$ is square-free, but not true in general.

Consider e.g. the case $n = 4$ and $a = 2$.

Proof for square-free $n$ is straightforward: it suffices to consider each prime factor of $n$, and that is a direct consequence of Euler (or even Fermat).

WhatsUp
  • 22,614