Maths Olympiad Prep

Library / /81 of 92

Number theory Difficulty 7.3 National olympiad, round 2 Prove it Iran

{an}n0\{a_n\}_{n \ge 0} and {bn}n0\{b_n\}_{n \ge 0} are two sequences of positive integers that ai,bi{0,1,2,,9}a_i, b_i \in \{0, 1, 2, \dots, 9\}. There is an integer number MM such that an,bn0a_n, b_n \ne 0 for all nMn \ge M and for each n0n \ge 0
(ana1a0)2+999(bnb1b0)2+999 (\overline{a_n \cdots a_1 a_0})^2 + 999 \mid (\overline{b_n \cdots b_1 b_0})^2 + 999

(Note that (xnxn1x0)=10n×xn++10×x1+x0(\overline{x_n x_{n-1} \dots x_0}) = 10^n \times x_n + \dots + 10 \times x_1 + x_0.)

prove that an=bna_n = b_n for n0n \ge 0.

Solution

Define
An:=ana1a0,Bn:=bnb1b0,Kn:=Bn2+999An2+999. A_n := \overline{a_n \dots a_1 a_0}, \quad B_n := \overline{b_n \dots b_1 b_0}, \quad K_n := \frac{B_n^2 + 999}{A_n^2 + 999}.
Claim 1. {Kn}\{K_n\} is eventually constant or 10nAn12+99910^n \mid A_{n-1}^2 + 999 for each positive integer nn.

---

*Proof.* For each n1n \ge 1
Bn2+999=Kn(An2+999),Bn12+999=Kn1(An12+999)(1) B_n^2 + 999 = K_n (A_n^2 + 999), \quad B_{n-1}^2 + 999 = K_{n-1} (A_{n-1}^2 + 999) \quad (1)
From the Definition of An,BnA_n, B_n we know that
AnAn1(mod10n),BnBn1(mod10n)(2) A_n \equiv A_{n-1} \pmod{10^n}, \quad B_n \equiv B_{n-1} \pmod{10^n} \quad (2)
Then (1),(2) imply that
Kn(An2+999)Kn1(An12+999)(mod10n).(3) K_n (A_n^2 + 999) \equiv K_{n-1} (A_{n-1}^2 + 999) \pmod{10^n}. \quad (3)
If there exist N1N \ge 1 such that 10NAN12+99910^N \nmid A_{N-1}^2 + 999, then there is a prime number p{2,5}p \in \{2, 5\} such that pNAN12+999p^N \nmid A_{N-1}^2 + 999. (2) infers that AnAN1(modpN)A_n \equiv A_{N-1} \pmod{p^N} for each nN1n \ge N-1. So pNAn2+999p^N \nmid A_n^2 + 999, meaning
vp(An2+999)N, v_p (A_n^2 + 999) \le N,
where vp(x)v_p(x) is the power of pp in prime factorization of xx.
Define dn:=gcd(10n,An12+999)d_n := \gcd(10^n, A_{n-1}^2 + 999). If nN+1n \ge N+1 then dn10npnNd_n \nmid \frac{10^n}{p^{n-N}} because vp(An2+999)Nv_p(A_n^2 + 999) \le N. According to (3) there is KnKn1(mod10ndn)K_n \equiv K_{n-1} \pmod{\frac{10^n}{d_n}} so
KnKn1(modpnN),(4) K_n \equiv K_{n-1} \pmod{p^{n-N}}, \quad (4)
if nMn \ge M is large enough such that pnN>100p^{n-N} > 100 then for each in1i \ge n-1
Ai10i    Ai2+999102i+999Bi<10i+1    Bi2+999<102i+2+999. A_i \ge 10^i \implies A_i^2 + 999 \ge 10^{2i} + 999 \\ B_i < 10^{i+1} \implies B_i^2 + 999 < 10^{2i+2} + 999.
Then
Ki=Bi2+999Ai2+999<100<pnN K_i = \frac{B_i^2 + 999}{A_i^2 + 999} < 100 < p^{n-N}
Hence (4) implies that Kn1=KnK_{n-1} = K_n for large enough values of nn so the claim is done. \square

As discussed above there are two cases:
1. 10nAn12+99910^n \mid A_{n-1}^2 + 999 for each n1n \ge 1.
2. {Kn}\{K_n\} is eventually constant.

Claim 2. *By assumption of the first case, an=bna_n = b_n for all non-negative integers nn.*

---

*Proof.* Let n1n \ge 1 be any positive integer.
An2+999Bn2+999    10nBn12+999 A_n^2 + 999 \mid B_n^2 + 999 \implies 10^n \mid B_{n-1}^2 + 999
With above assertions and some calculation it's deduced that a0=b0,a1=b1a_0 = b_0, a_1 = b_1. Note that An=10nan+An1A_n = 10^n a_n + A_{n-1} so
An2+9992×10nanAn1+An12+999(mod10n+1). A_n^2 + 999 \equiv 2 \times 10^n a_n A_{n-1} + A_{n-1}^2 + 999 \pmod{10^{n+1}}.
Clearly, 2×10n10n+1An2+9992 \times 10^n \mid 10^{n+1} \mid A_n^2 + 999 thus
2×10nAn12+999Bn12+999(5) 2 \times 10^n \mid A_{n-1}^2 + 999 \mid B_{n-1}^2 + 999 \quad (5)
Which is stronger than assumed relation at beginning of the claim. The remaining part of proof is by using induction. Assume that am=bma_m = b_m for all 0mn10 \le m \le n - 1. Which means An1=Bn1A_{n-1} = B_{n-1}. Using (5) implies for all n1n \ge 1
An2+9990(mod2×10n+1)    (10nan+An1)2+9990(mod2×10n+1). \begin{align*} A_n^2 + 999 &\equiv 0 \pmod{2 \times 10^{n+1}} \\ \implies (10^n a_n + A_{n-1})^2 + 999 &\equiv 0 \pmod{2 \times 10^{n+1}}. \end{align*}
Which implies
anAn1+An12+9992×10n0(mod10).(6) a_n A_{n-1} + \frac{A_{n-1}^2 + 999}{2 \times 10^n} \equiv 0 \pmod{10}. \quad (6)
Repeating above discussion with Bn2+999B_n^2 + 999 infers that
bnBn1+Bn12+9992×10n0(mod10).(7) b_n B_{n-1} + \frac{B_{n-1}^2 + 999}{2 \times 10^n} \equiv 0 \pmod{10}. \quad (7)
According to (6), (7) and the assertion of An1=Bn1A_{n-1} = B_{n-1} (induction) it's known that anAn1bnAn1(mod10)a_n A_{n-1} \equiv b_n A_{n-1} \pmod{10}. Moreover gcd(An,10)=1\gcd(A_n, 10) = 1 since 10n+1An2+99910^{n+1} \mid A_n^2 + 999. This implies anbn(mod10)a_n \equiv b_n \pmod{10}. Hence an=bna_n = b_n since 0an,bn90 \le a_n, b_n \le 9. Claim is proved. \square

The only remaining part of solution is the case that {Kn}\{K_n\} is eventually constant. Suppose that there exist positive integers K,TK, T such that Kn=KK_n = K for all nTn \ge T. Suppose that nTn \ge T then
Bn2+999=K(An2+999)An=10nan+An1Bn=10nbn+Bn1}    10nbn2+2×bnBn1=K(10nan2+2×anAn1)    10n(bn2Kan2)=2(KanAn1bnBn1). \left. \begin{array}{l} B_n^2 + 999 = K(A_n^2 + 999) \\ A_n = 10^n a_n + A_{n-1} \\ B_n = 10^n b_n + B_{n-1} \end{array} \right\} \\ \implies 10^n b_n^2 + 2 \times b_n B_{n-1} = K (10^n a_n^2 + 2 \times a_n A_{n-1}) \\ \implies 10^n (b_n^2 - K a_n^2) = 2 (K a_n A_{n-1} - b_n B_{n-1}).
So
10nAn1(bn2Kan2)=2(KanbnBn1An1).(8) \frac{10^n}{A_{n-1}} (b_n^2 - K a_n^2) = 2 \left( K a_n - b_n \frac{B_{n-1}}{A_{n-1}} \right). \quad (8)
It's known that An,Bn10nA_n, B_n \ge 10^n for large enough integers nn
    An2An2+999,Bn2Bn2+999. \implies A_n^2 \simeq A_n^2 + 999, \quad B_n^2 \simeq B_n^2 + 999.
Which implies
Bn2KAn2    limnBnAn=K. B_n^2 \simeq K A_n^2 \implies \lim_{n \to \infty} \frac{B_n}{A_n} = \sqrt{K}.
Define
Cn:=BnAnK    limnCn=0, C_n := \frac{B_n}{A_n} - \sqrt{K} \implies \lim_{n \to \infty} C_n = 0,
according to (8)
10nAn1(bn2Kan2)=2(KanbnK)2bnCn    10nAn1(bnKan)(bn+Kan)=2K(Kanbn)2bnCn    (bnKan)(10nAn1(bn+Kan)+2K)=2bnCn(9) \begin{aligned} \frac{10^n}{A_{n-1}} (b_n^2 - K a_n^2) &= 2 (K a_n - b_n \sqrt{K}) - 2 b_n C_n \\ \implies \frac{10^n}{A_{n-1}} (b_n - \sqrt{K} a_n) (b_n + \sqrt{K} a_n) &= 2 \sqrt{K} (\sqrt{K} a_n - b_n) - 2 b_n C_n \\ \implies (b_n - \sqrt{K} a_n) \left( \frac{10^n}{A_{n-1}} (b_n + \sqrt{K} a_n) + 2 \sqrt{K} \right) &= -2 b_n C_n \end{aligned} \quad (9)
Right Hand Side of (9) converges to 0 since limnCn=0\lim_{n \to \infty} C_n = 0 and 0bn90 \le b_n \le 9. Also the second parenthesis in (9) is always greater than 2K2\sqrt{K}. So
limnbnKan=0 \lim_{n \to \infty} b_n - \sqrt{K} a_n = 0
But bnKanb_n - \sqrt{K}a_n has finite values which infers that there exist positive integer LML \ge M such that bn=Kanb_n = \sqrt{K}a_n for all nLn \ge L. Therefore according to (9) there must be 2bnCn=0-2b_nC_n = 0 for all nLn \ge L. Which implies Cn=0C_n = 0 since bn0b_n \ne 0 for nMn \ge M. Therefore
Cn=0    Bn=KAn C_n = 0 \implies B_n = \sqrt{K} A_n
In addition with Bn2+999=K(An2+999)B_n^2 + 999 = K(A_n^2 + 999) it's easy to see that 999K=999999K = 999 which means K=1K = 1. So for large enough positive numbers nn,
Bn=An    bnb1b0=ana1a0 B_n = A_n \implies \overline{b_n \cdots b_1 b_0} = \overline{a_n \cdots a_1 a_0}
Therefore ak=bka_k = b_k for all k0k \ge 0 and we're done! ■

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic and difficulty added by this site.