# For any kind of prime $p > 3$, why is $p^2-1$ constantly divisible by 24?

I recognize this is really standard and also behind the times to several, yet I enjoy this inquiry and also I want seeing whether there are any kind of evidence past both I currently recognize.

This is someplace in between a solution and also discourse. As others have actually claimed, the inquiry amounts revealing : for any kind of prime $p > 3$, $p^2 \equiv 1 \pmod 3$ and also $p^2 \equiv 1 \pmod 8$. Both of these declarations are uncomplicated to show by simply considering the $\varphi(3) = 2$ lowered deposit courses modulo $3$ and also the $\varphi(8) = 4$ lowered deposit courses modulo $8$. Yet what is their value?

For a favorable integer $n$, allow $U(n) = (\mathbb{Z}/n\mathbb{Z})^{\times}$ be the multiplicative team of devices (" lowered deposits") modulo $n$. Like any kind of abelian team $G$, we have a making even map

$[2]: G \rightarrow G$, $g \mapsto g^2$,

the photo of which is the set of squares in $G$. So, the inquiry amounts : for $n = 3$ as well as additionally $n = 8$, the subgroup of squares in $U(n)$ is the unimportant team.

The team $U(3) = \{ \pm 1\}$ has order $2$ ; given that $(-1)^2 = 1$, the reality that the subgroup of squares amounts to $1$ is rather clear. Yet extra usually, for any kind of weird prime $p$, the making even map $[2]$ on $U(p)$ is 2 - to - one onto its photo - - a component of an area runs out than 2 square origins - - to make sure that specifically half of the components of $U(p)$ are squares. It ends up that when $p = 3$, fifty percent of $p-1$ is $1$, yet certainly this is rather uncommon : it does not take place for any kind of various other weird prime $p$.

The team $U(8) = \{1,3,5,7\}$ has order $4$. By example to the instance of $U(p)$, one could anticipate the making even map to be 2 - to - one onto its photo to make sure that specifically half of the components are squares. Yet that is not what is taking place below : without a doubt

$1^2 \equiv 3^2 \equiv 5^2 \equiv 7^2 \equiv 1 \pmod 8$,

so the subgroup of squares is once more unimportant. What's various? Given that $\mathbb{Z}/8\mathbb{Z}$ is not an area, it is lawful for an offered component to have greater than 2 square origins, yet an extra informative solution originates from the framework of the teams $U(n)$. For any kind of weird prime $p$, the team $U(p)$ is *cyclic * of order $p-1$ (" presence of primitive origins"). It is very easy to see that in any kind of cyclic team of also order, specifically fifty percent of the components are squares. So $U(8)$ has to not be cyclic, so it has to be the various other abelian team of order $4$, i.e., isomorphic to the Klein $4$ - team $C_2 \times C_2$.

Extra usually, if $p$ is a weird prime number and also $a$ is a favorable integer, after that $U(p^a)$ is cyclic of order $p^{a-1}(p-1)$ therefore isomorphic to $C_{p^{a-1}} \times C_{p-1}$, whereas for any kind of $a \geq 2$, the team $U(2^a)$ is isomorphic to $C_{2^{a-2}} \times C_2$. This is just one of the first check in number theory "there is something weird concerning the prime $2$".

**Included ** : Note that the above factors to consider permit us to address the extra basic inquiry : "What is the biggest favorable integer $N$ such that for all tops $p$ with $\operatorname{gcd}(p,N) = 1$, $N$ separates $(p^2-1)$?" (Answer : $N = 24$.)

**Included Later ** : I simply saw this arxiv preprint which is totally committed to the monitoring made in the previous paragraph. I presume the writer does not follow this website ...

Actually the outcome holds a little bit extra usually, particularly:

**Lemma ** $\rm\ \ 24\ |\ M^2 - N^2 \;$ if $\rm \; M,N \perp 6, \;$ i.e. coprime to $6.\;$ The evidence is very easy:

$\rm\quad\quad\quad N\perp 2 \;\Rightarrow\; N = \pm 1, \pm 3 \pmod 8 \;\Rightarrow\; N^2 = 1 \pmod 8$

$\rm\quad\quad\quad N\perp 3 \;\Rightarrow\; N \;\;= \;\;\;\pm 1\ \pmod 3 \;\Rightarrow\; N^2 = 1 \pmod 3 \;$

So $\rm \quad\; 3, 8\ |\ N^2 - 1 \;\Rightarrow\; 24\ |\ N^2 - 1 \ $ given that $\ {\rm lcm}(3,8) = 24.$

This is a grandfather clause $\rm\ n = 24\ $ of this far more basic result

**Theorem ** $\ $ For naturals $\rm\ a,e,n $ with $\rm\ e,n>1 $

$\rm\quad n\ |\ a^e-1$ for all $\rm a\perp n \ \iff\ \phi'(p^k)\:|\:e\ $ for all $\rm\ p^k\:|\:n,\ \ p\:$ prime

with $\rm \;\;\; \phi'(p^k) = \phi(p^k)\ $ for weird tops $\rm p\:,\ $ where $\phi$ is Euler's totient function

and also $\rm\ \quad \phi'(2^k) = 2^{k-2}\ $ if $\rm k>2\:,\ $ else $\,2$

The last exemption results from $\rm \mathbb Z/2^k$ having multiplicative team $\rm C(2) \times C(2^{k-2})$ for $\rm k>2$.

Notification that the least such exponent $\rm e$ is offered by $\rm \;\lambda(n)\; = \;{\rm lcm}\;\{\phi'(\;{p_i}^{k_i})\}\;$ where $\rm \; n = \prod {p_i}^{k_i}\;$.

$\rm\lambda(n)$ is called the (global) exponent of the team $\rm \mathbb Z/n^*,\;$ a.k.a. the Carmichael function.

So the instance handy is merely $\rm\ \lambda(24) = lcm(\phi'(2^3),\phi'(3)) = lcm(2,2) = 2\:.$

See my post here for evidence and also more conversation.

Here's a really simplified evidence:

$n^2 = 1 \pmod{24}$ for $n=1,5,7,11$, by examining each instance independently.

$(n+12)^2 = n^2 + 24n + 144 = n^2 \pmod{24}$.

Consequently, $n^2 = 1 \pmod{24}$ when $n$ is weird and also not divisible by $3$, therefore $n^2-1$ is divisible by $24$ for these $n$. You do not require primality of $p$ below!

A mild alteration would certainly be to make use of $1$ and also $5$ as "base instances", and also make use of the reality that $(n+6)^2 = n^2 + 12n + 36 = n^2 + 12(n+3)$, which amounts to $n^2 \pmod{24}$ when $(n+3)$ is also, i.e. $n$ is weird.

$p$ has to be conforming either to 1,3,5,7 modulo 8. After that $p^2$ is conforming to $1$ modulo $8$ in either instance. So $8$ separates $p^2-1$.

Currently, $p$ is not a numerous of 3, so either $p-1$ or $p+1$ is a numerous of 3. So $3$ separates $p^2-1$.

With each other, it adheres to that 24 separates $p^2 -1 $.

The most primary evidence I can consider, without clearly stating any kind of number concept : out of the 3 successive numbers $p – 1$, $p$, $p + 1$, among them have to be divisible by $3$; additionally, given that the neighbors of *p * are successive also numbers, among them have to be divisible by $2$ and also the various other by $4$, so their item is divisible by $3 · 2 · 4 = 24$-- and also certainly, we can toss $p$ out given that it's prime, and also those variables can not originate from it.

$P^2-1 = (P+1)(P-1)$. $P$ has to be either $1$ or $(2 \mod 3)$, so we have a variable of $3$ in the item. And also $P$ is additionally either $1$ or $3 \mod 4$.

Therefore either $2|(P+1)$ and also $4|(P-1)$ or $2|(P-1)$ and also $4|(P+1)$.

Hence $8*3= 24$ separates the item.