Find all natural $n{}$ such that for every natural $a{}$ that is mutually prime with $n{}$, the number $a^n - 1$ is divisible by $2n^2$.
Problem
Source: Russian TST 2016, Day 10 P1 (Group NG)
Tags: number theory, Divisibility
19.04.2023 18:05
I remember this from somewhere. Oh well, here is a proof. I claim all such $n$ are $n=2,2\cdot 3, 2\cdot 3\cdot 7$ and $2\cdot 3\cdot 7\cdot 43$. We proceed via a series of claims. First, we prove $n$ is even. Assume $n$ is odd. Take $a\equiv 1\pmod{n}$ and $a\equiv 0\pmod{2}$ (such an $a$ exists via CRT). Clearly $2\nmid a^n-1$ for such an $n$, so $n$ is even. Next, we prove $n$ is square-free: if $p\mid n$ is a prime then $v_p(n)=1$. First, let $p>2$ is a prime dividing $n$. Take $a\equiv p+1\pmod{p^2}$ and $a\equiv 1\pmod{n/p^e}$, where $e=v_p(n)$. By LTE, $v_p(a^n-1)=1+v_p(n)$. As $v_p(2n^2)=2v_p(n)$, we get $v_p(n)=1$. Next, we show $2\mid \mid n$. Note that $v_2(a^n-1)=v_2(a-1)+v_2(a+1)+v_2(n)-1$ via LTE. So, we must ensure $v_2(a-1)+v_2(a+1)\ge v_2(n)+2$ for any such $a$. Notice, however, that taking $a\equiv 1\pmod{n'}$ and $a\equiv 3\pmod{8}$, where $n'$ is the `odd part' of $n$, we immediately obtain a contradiction. So, $n$ is of form $2p_1\cdots p_k$ where $2<p_1<\cdots<p_k$ are primes. Lastly, take $n$ such that $n\equiv 1\pmod{n/p_i}$ and $n\equiv g_i\pmod{p_i}$ where $g_i$ is a primitive root modulo $p_i$ to obtain $p_i-1\mid 2p_1\cdots p_k$. Noting $(p_i-1,p_{i+1}\cdots p_k)=1$, we conclude $p_i-1\mid 2p_1\cdots p_{i-1}$ for any $i$. From here, we can easily `reverse-engineer' the solutions I claimed above.
19.04.2023 19:30
@above It is from Turkey TST 2015.