Consider the sequence in which $a_1 = 1$ and $a_n$ is obtained by juxtaposing the decimal representation of $n$ at the end of the decimal representation of $a_{n-1}$. That is, $a_1 = 1$, $a_2 = 12$, $a_3 = 123$, $\dots$ , $a_9 = 123456789$, $a_{10} = 12345678910$ and so on. Prove that infinitely many numbers of this sequence are multiples of $7$.
Problem
Source: Brazilian Mathematical Olympiad 2018 - Q5
Tags: number theory, Sequence, multiple, Brazilian Math Olympiad, Brazilian Math Olympiad 2018
16.11.2018 19:21
$7\mid 2 (2 (2 (2\cdot \bold{1}+1)+2)+3)+4$ $7\mid 2 (2 (2 (2 (2 (2 (2 (2 (2\cdot \bold{2}+1)+2)+3)+4)+5)+6)+7)+8)+9$ $7\mid 2\cdot \bold{3}+1$ $7\mid 2 (2 (2 (2 (2 (2 (2 (2\cdot \bold{4}+1)+2)+3)+4)+5)+6)+7)+8$ $7\mid 2 (2 (2 (2 (2\cdot\bold{ 5}+1)+2)+3)+4)+5$ $7\mid 2 (2 (2 (2 (2 (2\cdot\bold{6}+1)+2)+3)+4)+5)+6$ Problem Solved!
16.11.2018 19:36
What does this mean?
16.11.2018 19:45
just notice something like $x_{10}\equiv 2x_9+10\pmod 7,x_{11}\equiv 2x_{10}+11\pmod 7$,etc
17.11.2018 19:13
You can also analyse these sequences mod 7 and prove by contradiction : $a_{10^{6k-1}},a_{10^{6k-1}+1},a_{10^{6k-1}+2},...,a_{10^{6k}-1}$ $a_{10^{6k}},a_{10^{6k}+1},a_{10^{6k}+2},...,a_{10^{6k+1}-1} $ ... $a_{10^{6k+4}},a_{10^{6k+4}+1},a_{10^{6k+4}+2},...,a_{10^{6k+5}-1} $
10.08.2022 22:56
Nice Bash! In which follows we work in $\mathbb{Z}{/}7\mathbb{Z}$ Take $k$ be any integer positive integer greater than $1,$ so that $k\equiv 1 \pmod 6$ and denote $l:= 10^{k-1}$ and $p=a_{l-1}.$ First we find a formula for $a_n\pmod 7 $ for $l\le n <10l$ in terms of $a_{l-1}.$ We have by problems condition that for $l\le n \le 10l:$ $$a_n = a_{n-1}\cdot 10^k+n = 10a_{n-1}+ n$$where we used the fact that $10^k=10$ since $k \equiv 1 \pmod 6$(i.e. Fermat's Little Theorem). We can easily solve the above linear system to find $$ a_n = 10^{n-l+1}p + \sum_{i=l}^n i\cdot 10^{n-i}~(1A)$$Now we evaluate the last summation; we have $$\sum_{i=l}^n i\cdot 10^{n-i} = n + 10(n-1) + 10^2(n-2) + \dots 10^{n-l}l = n\sum_{i=0}^{n-l} 10^i - \sum_{i=1}^{n-l} i10^i ~(2A)$$The first summation of above is $\frac{10^{n-l+1}-1}{9}$ while the second one is $$\sum_{i=1}^{n-l} i10^i = \sum_{i=1}^{n-l} 10^i \cdot \sum_{j=0}^{n-l-i+1}10^j = \sum_{i=1}^{n-l} 10^i \cdot \frac{10^{n-l-i+2}-1}{9}=$$$$= \sum_{i=1}^{n-l} \frac{10^{n-l+2} -10^i}{9} = (n-l)\cdot \frac{10^{n-l+2}}{9} - \sum_{i=1}^{n-l}\frac{10^i}{9} =$$$$=(n-l)\cdot \frac{10^{n-l+2}}{9} - \left(\frac{10^{n-l+1}-10}{81} \right) $$Plugging the above back in $2A$ we get $$\sum_{i=l}^n i\cdot 10^{n-i}= n\left(\frac{10^{n-l+1}-1}{9} \right) - \frac{(n-l)\cdot 10^{n-l+2}}{9} +\frac{10^{n-l+1}-10}{81}$$Plugging that back in $(1A)$ we finally get $$a_n = 10^{n-l+1}p + n\left(\frac{10^{n-l+1}-1}{9} \right) - \frac{(n-l)\cdot 10^{n-l+2}}{9} +\frac{10^{n-l+1}-10}{81} $$Now note that $l = 10^{k-1} \equiv 4 \pmod 6$ (we are not using any assumption about $k$ here; all powers of $10$ are $4\pmod 6$) so that by Fermat's Little Theorem $10^{-l} = 10^{-4} = 2.$ Also, $l = 10^{k-1} = 1,$ by the choice of $k;$ so that the above can be simplified to $$ a_n = 2\cdot 10^{n+1}p + n\left( \frac{2\cdot 10^{n+1} -1}{9} \right) -\frac{2(n-1)\cdot 10^{n+2}}{9} + \frac{2\cdot 10^{n+1}-10}{81}~(3A)$$Now let $r,s$ be any two elements of $\mathbb{Z}{/}7\mathbb{Z}$ with $s \ne 0;$ since $10$ is a primitive root modulo $7,$ we can choose $n$ so that $n$ is a solution of $n= r$ and $10^{n+1} =s.$ Further, by Chinese Remainder Theorem, the solutions are residue class modulo $42,$ so that we can indeed choose $n$ in $[l,10l)$ (of course $9l>42$ since $k\ge 6$) . Then replace $\frac{1}{9} = -3, 20 = -1, \frac{1}{81} = 2$ and then $(3A)$ gets $$ a_n =2sp -3(2s+1)r -3(r-1)s + 2(2s-3) =$$$$= 2sp -6rs -3r -3rs + 3s + 4s -6 = 2sp-2rs-3r+1$$We want $a_n=0,$ indeed since we can choose any $r,s$ with the only restriction $s\ne 0,$ we only need to choose say $s=1$ and $r= \frac{2p+1}{5}.$ So done.
29.07.2023 06:02
Note that if $a_n = 10^{6i+3} \cdot a_{n-1} + n$ with $10^{6i+2} \leq n < 10^{6i+3}$ and suppose that $n+1$ and $n+2$ have $6i+3$ digits too, so $a_n \equiv 6 a_{n-1} + n \equiv n - a_{n-1} (mod~7) $ , then $a_{n+1} \equiv n+1 - a_n \equiv n+1 - n + a_{n-1} =$ $ a_{n-1}+1 (mod~7)$ and $a_{n +2} \equiv n+2 - a_{n+1} \equiv n+2 - a_{n-1} - 1 =$ $ n - a_{n-1} + 1 \equiv a_n + 1 (mod~7) $, so $a_{n+2} \equiv a_{n} + 1 (mod~7)$. It means that between $a_{10^{6i+2}}$, $a_{10^{6i+2}+2}$, $a_{10^{6i+2}+4}$, $a_ {10 ^{6i+2}+6}$, $a_{10^{6i+2}+8}$, $a_{10^{6i+2}+10}$ and $a_{10^{6i +2}+12}$ has a multiple of 7, so we can vary the i between the integers and have infinite numbers that are multiples of 7.