Juan writes the list of pairs $(n, 3^n)$, with $n=1, 2, 3,...$ on a chalkboard. As he writes the list, he underlines the pairs $(n, 3^n)$ when $n$ and $3^n$ have the same units digit. What is the $2013^{th}$ underlined pair?
Problem
Source: CentroAmerican 2013 Problem 1
Tags: modular arithmetic, number theory unsolved, number theory, Last digit
24.08.2013 22:44
11.05.2022 02:26
Let $a_{i}$ the $i-th$ underlined pair. Checking some cases we have $a_{1}=7$, $a_{2}=13$, $a_{3}=27$, $a_{4}=33$, $a_{5}=47$, $a_{6}=53$, $a_{7}=67$ and so on. Here, is easy to see that if $i$ is odd, $a_{i+2} - a_{i}=20.$ Claim; If $i$ is odd, $a_{i}=7+20 \lfloor\frac{i}{2}\rfloor$ Proof using induction; If $i=1\Rightarrow a_{1}=7+20\lfloor\frac{1}{2}\rfloor=7+20(0)=7$. Now, suppose that its true for $1,3,5,..,i$. So, we have to prove it for $i+2$. We have $a_{i+2}=7+20 \lfloor\frac{i+2}{2}\rfloor$=$7+20( \lfloor\frac{i}{2}\rfloor+1)$=$7+20 \lfloor\frac{i}{2}\rfloor+20$=$a_{i}+20$, this implies that this is true. So, $a_{2013}=7+20 \lfloor\frac{2013}{2}\rfloor$=$20127$. So, the $2013-th$ underlined pair is $(20127, 3^{20127})$