Olympiad Maths Prep

Track / Stage 6 / 323 of 400 #1323 of 2000

Problem 1323

National olympiad, first round
Number theory Difficulty 6.6 Find the answer

Define a a sequence <an>n\equal1 {<{a_n}>}^{\infty}_{n\equal{}1} as follows

an\equal0 a_n\equal{}0, if number of positive divisors of n n is [i]odd[/i]
an\equal1 a_n\equal{}1, if number of positive divisors of n n is [i]even[/i]

(The positive divisors of n n include 1 1 as well as n n.)Let x\equal0.a1a2a3........ x\equal{}0.a_1a_2a_3........ be the real number whose decimal expansion contains an a_n in the n n-th place,n1 n\geq1.Determine,with proof,whether x x is rational or irrational.

This one wants a proof. Work it on paper, read the official solution, then mark yourself honestly — the ladder only means something if the record is true.

Official solution

1. Lemma 1: an=0 a_n = 0 if and only if n n is a perfect square. Otherwise, an=1 a_n = 1 .

Proof: Write n n as its prime factorization: n=p1a1p2a2prar n = p_1^{a_1} p_2^{a_2} \cdots p_r^{a_r} where pi p_i are distinct primes and aiZ a_i \in \mathbb{Z} . The number of divisors of n n is given by (a1+1)(a2+1)(ar+1) (a_1 + 1)(a_2 + 1) \cdots (a_r + 1) . This product is odd if and only if each ai a_i is even, which means n n is a perfect square.

2. Lemma 2: A number m=0.b1b2b3 m = 0.b_1b_2b_3\ldots is rational if and only if the sequence b1,b2,b3, b_1, b_2, b_3, \ldots is periodic.

Proof: Every rational number x=0.c1c2c3 x = 0.c_1c_2c_3\ldots has a periodic decimal representation. Let x=pq x = \frac{p}{q} where gcd(p,q)=1 \gcd(p, q) = 1 and q>p>0 q > p > 0 . There exist integers r r and s s such that q10s(10r1) q \mid 10^s(10^r - 1) . Let s=max{e2(q),e5(q)} s = \max \{ e_2(q), e_5(q) \} , where ep(n) e_p(n) is the maximal exponent of p p dividing n n . Let g=q2e2(q)5e5(q) g = \frac{q}{2^{e_2(q)} 5^{e_5(q)}} , so q10s(10r1)    g10r1 q \mid 10^s(10^r - 1) \iff g \mid 10^r - 1 . Choose r=ϕ(g) r = \phi(g) , where ϕ \phi is Euler's totient function. Thus, q10s(10r1) q \mid 10^s(10^r - 1) . Let k=10s(10r1)q k = \frac{10^s(10^r - 1)}{q} . Then x=pkqk x = \frac{p \cdot k}{q \cdot k} . Define the digits d1,d2,,dt d_1, d_2, \ldots, d_t of pk p \cdot k so that pk=d1d2dt p \cdot k = d_1d_2\ldots d_t . Then x=d1d2dt9999 x = \frac{d_1d_2\ldots d_t}{99\ldots 99} with t t nines. Hence, x=0.d1d2dtd1d2dt x = 0.d_1d_2\ldots d_t d_1d_2\ldots d_t \ldots , showing a periodic decimal representation.

3. We want to prove that the number x=0.a1a2a3 x = 0.a_1a_2a_3\ldots is irrational. Assume, for contradiction, that x x is rational. By Lemma 2, the sequence a1,a2, a_1, a_2, \ldots is periodic. Let n n be its period, meaning ak=an+k a_k = a_{n+k} for all kN k \in \mathbb{N} .

4. Since a1=1 a_1 = 1 , it follows that akn+1=1 a_{kn+1} = 1 for all kN k \in \mathbb{N} . By Lemma 1, 1,n+1,2n+1,3n+1, 1, n+1, 2n+1, 3n+1, \ldots must all be perfect squares.

5. Consider kn+1=m2 kn+1 = m^2 for some k k . Then (m+1)2=m2+2m+1>m2+n=(k+1)n+1 (m+1)^2 = m^2 + 2m + 1 > m^2 + n = (k+1)n + 1 . Thus, (k+1)n+1 (k+1)n + 1 lies between two squares, m2 m^2 and (m+1)2 (m+1)^2 , and cannot be a square. Therefore, a(k+1)n+1=0 a_{(k+1)n+1} = 0 , contradicting the periodicity of a1,a2, a_1, a_2, \ldots .

6. This contradiction implies that our assumption that x x is rational is false. Hence, x x must be irrational.

\blacksquare

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.