Problem

Source: CentroAmerican 2013 Problem 1

Tags: modular arithmetic, number theory unsolved, number theory, Last digit



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?