Find all positive integer $n$ such that for all positive integers $ x $, $ y $, $ n \mid x^n-y^n \Rightarrow n^2 \mid x^n-y^n $.
Problem
Source: Own. IMO 2022 Malaysian Training Camp 3
Tags: number theory
17.04.2022 10:49
I don’t know if this helps: $n | x^n-y^n \Rightarrow( \frac {x}{y})^n\equiv 1\mod n$ That’s why if $p$ is the smallest prime divisor of n, then $ (\frac{x}{y})^n\equiv 1\mod p$. Then if $k$ is the smallest number such that $(\frac{x}{y})^k\equiv 1\mod p$ then $k=gcd(n,p-1)$ which implies $k=1$, that’ s why $x\equiv y\mod p$. I guess all $n$ in the form $n=p_1p_2…p_l$ and such that $gcd(n,p_i-1)=1$ work because when $ n \mid x^n-y^n $ then it implies $x\equiv y\mod p_i$ and by LTE $p_i^2 | x^n-y^n \rightarrow n^2 | x^n-y^n$.
17.04.2022 11:12
$n=1$ is obvious. Now let's show that if $n$ is not square-free odd number, then it doesn't work. Let $p$ be prime such that $v_p(n)\geq 2$ and let $n=p^{t}\cdot T$, where $p\nmid T$ and $t\geq 2$. Then take $x=T(p+1), y=T$. From LTE we get $v_p(n)<v_p(x^n-y^n)=v_p(x-y)+v_p(n)=1+v_p(n)<2v_p(n)=v_p(n^2)$. Since $T\mid x^n-y^n$ we get $n\mid x^n-y^n$ but $n^2 \nmid x^n-y^n$. So all such numbers doesn't work. Now let's show that all square-free odd numbers work. Let $n=p_1\cdot p_2\cdots p_k=p_i\cdot S$. So we have that $p_i\mid x^{p_i\cdot S}-y^{p_i\cdot S} \implies p_i\mid x^S-y^S$. If $p_i\mid xy$, then $p_i\mid x, p_i\mid y \implies p_i^2\mid x^n-y^n$. If $p_i\nmid xy$ from LTE we get $v_{p_i}((x^S)^{p_i}-(y^S)^{p_i})=v_{p_i}(x^S-y^S)+v_{p_i}(p_i)\geq 2=v_{p_i}(n^2)$. So in both case $p_i^2\mid x^n-y^n$ for all $i=1,2,...,k$. So we get desired result. Now let's work on even $n$. If $v_2(n)=1$, or $n=2k$,where $k$ is odd, we get $x^{2k}-y^{2k}=A^2-B^2$ and it's obvious that if $2\mid A^2-B^2$,then $4\mid A^2-B^2$ also. Also from $n$'s odd case we get $k$ should be square-free odd number. Since $v_2(n)=1$ we get all square-free numbers (both odd and even) works. If $v_2(n)=2$, or $n=4l$,where $l$ is odd, we get if $x$ and $y$ are even, then $16\mid (x^4)^l-(y^4)^l$. If $xy$ is odd, then $x^{4l}-y^{4l}=(x^{2l}-y^{2l})(x^{2l}+y^{2l})$ and since $8\mid x^{2l}-y^{2l}$ we get $16\mid (x^{2l}-y^{2l})(x^{2l}+y^{2l})$. Also from $n$'s odd case we get $l$ is square-free odd number. So we get $4\cdot M$ works, where $M$ is odd square-free number. If $v_2(n)\geq 3$ I will show that $n$ doesn't work. Let $n=2^{\alpha}\cdot R$, where $R$ is odd and $\alpha\geq 3$. Take $x=R\cdot (2^{\alpha}+1), y=R\cdot (2^{\alpha-1}-1)$. Obviosly $R\mid x^n-y^n$. Also since $n$ is even $y^n\equiv R^n \cdot ((2^{\alpha-1}-1)^2)^{\frac{n}{2}} \equiv R^n \cdot (2^{2\alpha-2}-2^{\alpha}+1)^{\frac{n}{2}} \equiv R^n\equiv x^n \pmod{2^{\alpha}}$. So $n\mid x^n-y^n$. But $v_2(x^n-y^n)=v_2((2^{\alpha}+1)^n-(2^{\alpha-1}-1)^n)=v_2(n)+v_2(2^{\alpha}+2^{\alpha-1})+v_2(2^{\alpha-1}+2)-1=2\alpha-1<2\alpha=v_2(n^2)$. So $n^2\nmid x^n-y^n$. So if $v_2(n)\geq 3$, then $n$ doesn't work. Finally we get $n=2^{i}\cdot M$ where $M$ is square-free odd number or $1$ and $i\in\{0,1,2\}$. @below, I fixed it now.
17.04.2022 11:14
However, n=4 works.. [n need not be odd!]
18.04.2022 23:12
The answer is $n=m$ or $n=2m$ where $m$ is square-free. Let us prove a lemma: $\textbf{Lemma.}$ If $n=AB$, $\gcd(A,B)=1$, and $n$ is a solution, then so is $A$ and $B$. $\textbf{Proof.}$ Suppose $A$ is not a solution, then there must exist $x$, $y$ with $A\mid x^A-y^A$ but $A^2\nmid x^A-y^A$. Then consider $(xB)^A-(yB)^A=B^A(x^A-y^A)$, this cannot be a multiple of $A^2$. Also, $AB\mid B^A(x^A-y^A)$, since $B\mid B^A$ because $A\ge 1$, but this cannot be a multiple of $A^2B^2$. So $n=AB$ cannot be a solution. $\square$ By the lemma, it suffice to check prime powers only. For odd primes $p$, we prove that all primes $n=p$ works, and not for any higher powers of $p$. - If $n=p$, suppose $p\mid x^p-y^p \Rightarrow 0\equiv x^p-y^p\equiv x-y \pmod p \Rightarrow p\mid x-y$. If $p\mid x, y$ then the statement is obvious as $v_p(x^p-y^p)\ge p\ge 3 \Rightarrow p^2|x^p-y^p$. Otherwise $p\nmid x, y$, then by LTE, $v_p(x^p-y^p)=v_p(x-y)+v_p(p)=v_p(x-y)+1\ge 2 \Rightarrow p^2|x^p-y^p$. - If $n=p^k$ with $k\ge 2$, we claim that $x=p+1$ and $y=1$ violates the condition. In this case, $p\mid x-y$ and $p\nmid x, y$, so by LTE again, $v_p(x^n-y^n)=v_p(x-y)+v_p(n)=v_p(x-y)+k=k+1$, so $x^n-y^n$ is a multiple of $n$, but not $n^2$. For $p=2$, then it turns out that only $n=2, 4$ works. - If $n=2$, $2\mid x^2-y^2$ implies $x, y$ have the same parity. So $2\mid x-y, 2\mid x+y \Rightarrow 4\mid (x-y)(x+y)=x^2-y^2$. - If $n=4$, then $4\mid x^4-y^4$ implies $x, y$ have the same parity. If $x, y$ are both even then $x^4, y^4$ are both multiples of $16$, so as $x^4-y^4$. Otherwise $x-y, x+y, x^2+y^2$ are all even, and one of $x-y, x+y$ is a multiple of $4$, so $16\mid (x-y)(x+y)(x^2+y^2)=x^4-y^4$. - If $n=2^k$ with $k\ge 3$, we claim $x=3, y=1$ violates the condition. We note that $3^{2^k}-1=(3^{2^{k-1}}+1)(3^{2^{k-2}}+1)\cdots(3^2+1)(3+1)(2)$, and each factor $3^{2^i}+1$ is not a multiple of $4$, except for $(3+1)$. So $v_2(3^{2^k}-1)=(k-1)+2+1=k+2<2k$ for $k\ge 3$. So $2^{2k}$ does not divide $3^{2^k}-1$, for all $k\ge 3$, and thus not a solution. We conclude that all solutions must be $n=m$ or $n=2m$ where $m$ is square-free. $\blacksquare$