Download tasks/pb-advanced-008/solution/solve.sh from HuggingFaceSwarms/IMO-ProofBench: direct link, hf CLI and curl.
- Browser
- Download file 4.38 kB
-
https://huggingface.co/datasets/HuggingFaceSwarms/IMO-ProofBench/resolve/main/tasks/pb-advanced-008/solution/solve.sh
- Command line
-
hf download hf://datasets/HuggingFaceSwarms/IMO-ProofBench/tasks/pb-advanced-008/solution/solve.sh
-
curl -L -o solve.sh https://huggingface.co/datasets/HuggingFaceSwarms/IMO-ProofBench/resolve/main/tasks/pb-advanced-008/solution/solve.sh
4.38 kB
| set -eu | |
| PROOF=${PROOF:-/app/proof.md} | |
| mkdir -p "$(dirname -- "$PROOF")" | |
| cat > "$PROOF" <<'IMO_PROOF_25823c9e705bbb7180ed55319546730cc034932e770b777af059a80fc451705d' | |
| First, let's prove the following Lemma, which is an extension of Euler's theorem. | |
| <Lemma 1> Given positive integers $n$ and $a$, there exists a positive integer $N$ such that for any positive integer $k \geq N$, $a^{k+\phi(n)} \equiv a^{k}(\bmod n)$ holds. | |
| <Proof of Lemma 1> Let $p_1, p_2, \cdots, p_t$ the common prime divisors of $n$ and $a$, and let $\max_{1\le i\le t} v_{p_i} (n) =M$. Then, if we set $N=M$, the conclusion holds. Let $n=p_n \times q_n$, $a=p_a \times q_a$, where $p_n$ and $p_a$ represents the $p_1, p_2, \cdots, p_t$ part of the prime factorization of $n, a$, respectively. Note that $p_n | (p_1 p_2 \cdots p_t )^M$, and that $(a, q_n) =1$. | |
| First, if $k \geq M$, then $a^{k+\phi(n)} \equiv a^{k} \equiv 0\left(\bmod p_n \right)$. Also, $\phi(n)=\phi\left(p_n \right) \cdot \phi(q_n)$, so | |
| \[ | |
| a^{k+\phi(n)} \equiv a^{k+\phi\left(p_n\right) \cdot \phi(q_n)} \equiv a^{k}(\bmod q_m) | |
| \] | |
| holds. Combining the two equations, we obtain $a^{k+\phi(n)} \equiv a^{k}(\bmod n)$, which completes the proof. $\qed$ | |
| Let's also prove the following Lemma about $F_{n}$. | |
| <Lemma 2> Given positive integers $n$ and $a$, there exists a positive integer $N$ such that for any positive integer $k \geq N$, $F_{k} \equiv F_{k+\Phi(n)}(\bmod n)$ holds. | |
| Here, $\Phi(n)$ is the least common multiple of $n, \phi(n), \phi^{(2)}(n), \ldots$. | |
| <Proof of Lemma 2> | |
| We will prove this by induction on $n$. | |
| (1) (Base case) If $n=1$, the statement holds trivially. | |
| (2) (Induction step) Assume that the statement holds for all positive integers less than $n$. | |
| By the induction hypothesis, there exists a positive integer $N$ such that for $k \geq N$, | |
| \[ | |
| F_{k} \equiv F_{k+\Phi(\phi(n))}(\bmod \phi(n)) | |
| \] | |
| holds. | |
| Now, consider the least common multiple of $\Phi(\phi(n))$ and $n$, which is $\Phi(n)$. Since $F_{k+1}=(k+1)^{F_{k}}$, by <Lemma $1>$, | |
| \[ | |
| (k+\Phi(n)+1)^{F_{k+\Phi(n)}} \equiv(k+1)^{F_{k+\Phi(n)}} \equiv(k+1)^{F_{k}}(\bmod n) | |
| \] | |
| holds for all sufficiently large $k$. Therefore, the statement also holds for $n$. $\qed$ | |
| Now, let's prove the original problem. | |
| <Step 1>$ \operatorname{gcd}(\Phi(\phi(c)), c)<c$ | |
| <Step 1.1> Factorize $c$ into primes as $c=p_{1}^{e_{1}} \cdots p_{k}^{e_{k}}$. Also, let $p_{1}<\cdots<p_{k}, e_{i}>0$. | |
| <Step 1.2> Then, $\phi(c)=p_{1}^{e_{1}-1} \cdots p_{k}^{e_{k}-1}\left(p_{1}-1\right) \cdots\left(p_{k}-1\right)$, and since $p_{i}-1$ is not a multiple of $p_{k}$, | |
| \[ | |
| v_{p_{k}}(\phi(c))<v_{p_{k}}(c) | |
| \] | |
| holds. Also, the largest prime factor of $\phi(c)$ is less than or equal to $p_{k}$. | |
| <Step 1.3> Therefore, by induction, for all positive integers $r$, $v_{p_{k}}\left(\phi^{(r)}(c)\right)<v_{p_{k}}(c)$ holds. | |
| <Step 2> Applying strong induction on $c$ | |
| We will prove the problem by strong mathematical induction on $c$. | |
| <Step 2.1> If $c=1$, the statement holds for any positive integer $n$. | |
| <Step 2.2> Assume that the statement holds for $c=1, \ldots c-1$, and let's prove the statement for $c$. | |
| First, choose $n$ large enough so that | |
| \[ | |
| a^{F_{n}} \equiv a^{F_n+\phi(c)}(\bmod c) | |
| \] | |
| holds. By <Step 1>, $\operatorname{gcd}(c, \Phi(\phi(c)))<c$, so by the induction hypothesis, | |
| \[ | |
| a^{F_{n}}+n \equiv b(\bmod \operatorname{gcd}(c, \Phi(\phi(c))) | |
| \] | |
| has infinitely many solutions for $n$. | |
| <Step 2.3> By <Lemma 2>, among these solutions, for sufficiently large $n$, | |
| \[ | |
| a^{F_{n}} \equiv a^{F_{n+\Phi(\phi(c))}}(\bmod c) | |
| \] | |
| holds. Let this $n$ be $n_{0}$. | |
| <Step 2.4> Consider the following system of congruences for $n$: | |
| \[ | |
| n \equiv n_{0}(\bmod \Phi(\phi(c))), a^{F_{n_{0}}}+n \equiv b(\bmod c) | |
| \] | |
| This system of congruences has $n_{0}$ as a solution modulo $\operatorname{gcd}(c, \Phi(\phi(c)))$, so by the Chinese Remainder Theorem, there exists an $n$ that satisfies both congruences modulo $\operatorname{lcm}(\Phi(\phi(c)), c)$. For this $n$, | |
| \[ | |
| a^{F_{n}}+n \equiv a^{F_{n_{0}}}+n \equiv b(\bmod c) | |
| \] | |
| holds, so the desired equation holds, and therefore the induction hypothesis holds for $c$. | |
| By induction, for all $c$, there exist infinitely many $n$ that satisfy $a^{F_{n}}+n \equiv b(\bmod c)$. | |
| IMO_PROOF_25823c9e705bbb7180ed55319546730cc034932e770b777af059a80fc451705d | |