# Proving $24\mid5^{2n}-1$ using modular arithmetic

So, in general I am aware of how to use modular arithmetic to prove a divisibility. But I have the following problem:

Prove that $24\mid5^{2n}-1$ for all $n\in\mathbb Z$.

I know that theoretically, I could show 23 different cases that the expression is congruent to $0\bmod24$, but that seems like it might be excessive to me.

Is there a faster way to show this?

• $5^{2n}=(5^2)^n=25^n$ Now, note that $25^n=(24+1)^n$ and use something that should be familiar to you. Dec 11, 2017 at 3:01

You want to prove what $5^{2n}$ is congruent to in modulo 24

Notice that $5^{2n} = (5^2)^n$

$5^2=25 \equiv 1 \pmod {24}$

So $5^{2n} \equiv 1^n \equiv 1 \pmod {24}$

• Edited, and thanks Dec 11, 2017 at 3:05
• Makes sense, thank you! Dec 11, 2017 at 3:19

You could use $5^{2n}-1=(5^2-1)(5^{2n-2}+5^{2n-4}+\ldots +1)$ where you are summing the geometric series.

Use induction. It is true for $n=1$. Assuming it is true for $n$, show it is true for $n+1$: $$5^{2(n+1)}-1=25(5^{2n}-1)+24 = 0 (mod \ 24).$$

1)

Prove $8|5^{2n} - 1$ and $3|5^{2n} - 1$

a) $5^{2n} - 1 = (5^n -1)(5^n + 1)$. $5^n \pm 1 \equiv 1^n\pm 1 \equiv 0\mod 2$ so $2|5^2 - 1$ and $2|5^2 + 1$ and so $4|5^{2n}-1$. If $5^n - 1 = 2k$ then $5^{2n} + 1= 2k + 2 = 2(k+1)$. Either $k$ is even or $k+1$ is even so either $2k$ is even and $2(k+1)$ is divisible by $4$, or $2k$ is divisible by $4$ and $2(k+1)$ is even. Either way. $2k*2(k+1)= 5^{2n} -1$ is divisible by $8$.

b)$5^{2n}-1\equiv (-1)^{2n}-1 \equiv 1^n - 1 \equiv 0 \mod 3$.

So $3|5^{2n}-1$.

2)

Or notice $5^{2n} -1 = 25^n -1 \equiv 1^n -1 \equiv 0 \mod 24$.

(I will admit, I did not see the obvious right away.)